Skip to content

Commit

Permalink
cputest: add missing entries
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot committed Jun 24, 2018
1 parent 428c9ca commit b57797c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
7 changes: 7 additions & 0 deletions algo/cryptonight.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ void cryptonight_hash(void* output, const void* input) {
free(ctx);
}

void cryptonight_hash_v1(void* output, const void* input) {
const int variant = 0;
struct cryptonight_ctx *ctx = (struct cryptonight_ctx*)malloc(sizeof(struct cryptonight_ctx));
cryptonight_hash_ctx(output, input, 76, ctx, variant);
free(ctx);
}

static void cryptonight_hash_ctx_aes_ni(void* output, const void* input, int len, struct cryptonight_ctx* ctx, int variant)
{
size_t i, j;
Expand Down
1 change: 1 addition & 0 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ void bmwhash(void *output, const void *input);
void c11hash(void *output, const void *input);
void cryptolight_hash(void* output, const void* input);
void cryptonight_hash(void* output, const void* input);
void cryptonight_hash_v1(void* output, const void* input);
void decred_hash(void *output, const void *input);
void droplp_hash(void *output, const void *input);
void groestlhash(void *output, const void *input);
Expand Down
14 changes: 13 additions & 1 deletion util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2353,7 +2353,7 @@ void print_hash_tests(void)
cryptolight_hash(&hash[0], &buf[0]);
printpfx("cryptolight", hash);

cryptonight_hash(&hash[0], &buf[0]);
cryptonight_hash_v1(&hash[0], &buf[0]);
printpfx("cryptonight", hash);

decred_hash(&hash[0], &buf[0]);
Expand Down Expand Up @@ -2389,6 +2389,9 @@ void print_hash_tests(void)
lyra2rev2_hash(&hash[0], &buf[0]);
printpfx("lyra2v2", hash);

cryptonight_hash(&hash[0], &buf[0]);
printpfx("monero", hash);

myriadhash(&hash[0], &buf[0]);
printpfx("myr-gr", hash);

Expand All @@ -2401,6 +2404,12 @@ void print_hash_tests(void)
pentablakehash(&hash[0], &buf[0]);
printpfx("pentablake", hash);

phi1612_hash(&hash[0], &buf[0]);
printpfx("phi1612", hash);

phi2_hash(&hash[0], &buf[0]);
printpfx("phi2", hash);

pluck_hash((uint32_t*)&hash[0], (uint32_t*)&buf[0], scratchbuf, 128);
memset(&buf[0], 0, sizeof(buf));
printpfx("pluck", hash);
Expand Down Expand Up @@ -2439,6 +2448,9 @@ void print_hash_tests(void)
skein2hash(&hash[0], &buf[0]);
printpfx("skein2", hash);

sonoa_hash(&hash[0], &buf[0]);
printpfx("sonoa", hash);

s3hash(&hash[0], &buf[0]);
printpfx("s3", hash);

Expand Down

0 comments on commit b57797c

Please sign in to comment.