aboutsummaryrefslogtreecommitdiff
path: root/tests/hash/main.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-06 08:41:02 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-06 08:41:02 +0200
commitc102c49da5015592d2a2fedf0ae348495ec382df (patch)
treeba6f9a6ccc7e9d112ac2e305eac0160da2bdcbdf /tests/hash/main.cpp
parentMerge pull request #3261 (diff)
parenttweaks to the monerov1 cryptonight algorithm (diff)
downloadmonero-c102c49da5015592d2a2fedf0ae348495ec382df.tar.xz
Merge pull request #3253
e136bc6b tweaks to the monerov1 cryptonight algorithm (Lee Clagett) d58c9ec9 slow-hash: optimized version (SChernykh) 608fd6f1 Monero Cryptonight variants, and add one for v7 (moneromooo-monero)
Diffstat (limited to 'tests/hash/main.cpp')
-rw-r--r--tests/hash/main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/hash/main.cpp b/tests/hash/main.cpp
index aa928856a..5a16284df 100644
--- a/tests/hash/main.cpp
+++ b/tests/hash/main.cpp
@@ -51,6 +51,12 @@ extern "C" {
}
tree_hash((const char (*)[32]) data, length >> 5, hash);
}
+ static void cn_slow_hash_0(const void *data, size_t length, char *hash) {
+ return cn_slow_hash(data, length, hash, 0);
+ }
+ static void cn_slow_hash_1(const void *data, size_t length, char *hash) {
+ return cn_slow_hash(data, length, hash, 1);
+ }
}
POP_WARNINGS
@@ -58,9 +64,10 @@ extern "C" typedef void hash_f(const void *, size_t, char *);
struct hash_func {
const string name;
hash_f &f;
-} hashes[] = {{"fast", cn_fast_hash}, {"slow", cn_slow_hash}, {"tree", hash_tree},
+} hashes[] = {{"fast", cn_fast_hash}, {"slow", cn_slow_hash_0}, {"tree", hash_tree},
{"extra-blake", hash_extra_blake}, {"extra-groestl", hash_extra_groestl},
- {"extra-jh", hash_extra_jh}, {"extra-skein", hash_extra_skein}};
+ {"extra-jh", hash_extra_jh}, {"extra-skein", hash_extra_skein},
+ {"slow-1", cn_slow_hash_1}};
int main(int argc, char *argv[]) {
hash_f *f;