mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 12:46:06 -04:00
Monero Cryptonight variants, and add one for v7
This is the first variant of many, with the intent to improve Monero's resistance to ASICs and encourage mining decentralization.
This commit is contained in:
parent
0d150aca5c
commit
608fd6f14a
9 changed files with 71 additions and 17 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue