mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.8.1.1
This commit is contained in:
@@ -20,11 +20,11 @@ typedef struct {
|
||||
#else
|
||||
hashState_groestl groestl;
|
||||
#endif
|
||||
#ifndef USE_SPH_SHA
|
||||
SHA256_CTX sha;
|
||||
#else
|
||||
//#ifndef USE_SPH_SHA
|
||||
// SHA256_CTX sha;
|
||||
//#else
|
||||
sph_sha256_context sha;
|
||||
#endif
|
||||
//#endif
|
||||
} myrgr_ctx_holder;
|
||||
|
||||
myrgr_ctx_holder myrgr_ctx;
|
||||
@@ -36,11 +36,11 @@ void init_myrgr_ctx()
|
||||
#else
|
||||
init_groestl (&myrgr_ctx.groestl, 64 );
|
||||
#endif
|
||||
#ifndef USE_SPH_SHA
|
||||
SHA256_Init( &myrgr_ctx.sha );
|
||||
#else
|
||||
//#ifndef USE_SPH_SHA
|
||||
// SHA256_Init( &myrgr_ctx.sha );
|
||||
//#else
|
||||
sph_sha256_init( &myrgr_ctx.sha );
|
||||
#endif
|
||||
//#endif
|
||||
}
|
||||
|
||||
void myriadhash( void *output, const void *input )
|
||||
@@ -57,13 +57,13 @@ void myriadhash( void *output, const void *input )
|
||||
(const char*)input, 640 );
|
||||
#endif
|
||||
|
||||
#ifndef USE_SPH_SHA
|
||||
SHA256_Update( &ctx.sha, hash, 64 );
|
||||
SHA256_Final( (unsigned char*) hash, &ctx.sha );
|
||||
#else
|
||||
//#ifndef USE_SPH_SHA
|
||||
// SHA256_Update( &ctx.sha, hash, 64 );
|
||||
// SHA256_Final( (unsigned char*) hash, &ctx.sha );
|
||||
//#else
|
||||
sph_sha256(&ctx.sha, hash, 64);
|
||||
sph_sha256_close(&ctx.sha, hash);
|
||||
#endif
|
||||
//#endif
|
||||
memcpy(output, hash, 32);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user