mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
blake (SFR) and whirlpool (J) tested ok with a sha256d merkleroot So add a stratum setting to allow single sha256 merkle root... The shares are now valid on the pool side, but remains to find an old wallet to test... like Whirlcoin or blakecoin keccak not tested, could have the same problem about merkle/miners
34 lines
902 B
C
34 lines
902 B
C
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
#include "../sha3/sph_whirlpool.h"
|
|
|
|
/* untested ! */
|
|
|
|
void whirlpool_hash(const char* input, char* output, uint32_t len)
|
|
{
|
|
unsigned char hash[64] = { 0 };
|
|
int i;
|
|
|
|
sph_whirlpool1_context ctx_whirlpool;
|
|
|
|
sph_whirlpool1_init(&ctx_whirlpool);
|
|
sph_whirlpool1 (&ctx_whirlpool, input, len);
|
|
sph_whirlpool1_close(&ctx_whirlpool, (void*) hash);
|
|
|
|
sph_whirlpool1_init(&ctx_whirlpool);
|
|
sph_whirlpool1 (&ctx_whirlpool, (const void*) hash, 64);
|
|
sph_whirlpool1_close(&ctx_whirlpool, (void*) hash);
|
|
|
|
sph_whirlpool1_init(&ctx_whirlpool);
|
|
sph_whirlpool1 (&ctx_whirlpool, (const void*) hash, 64);
|
|
sph_whirlpool1_close(&ctx_whirlpool, (void*) hash);
|
|
|
|
sph_whirlpool1_init(&ctx_whirlpool);
|
|
sph_whirlpool1 (&ctx_whirlpool, (const void*) hash, 64);
|
|
sph_whirlpool1_close(&ctx_whirlpool, (void*) hash);
|
|
|
|
memcpy(output, hash, 32);
|
|
}
|