mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.9.1
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
#include "lyra2.h"
|
||||
#include "algo-gate-api.h"
|
||||
#include "avxdefs.h"
|
||||
|
||||
#ifndef NO_AES_NI
|
||||
#if defined(__AES__)
|
||||
#include "algo/groestl/aes_ni/hash-groestl256.h"
|
||||
#endif
|
||||
|
||||
@@ -18,10 +17,10 @@ typedef struct {
|
||||
sph_blake256_context blake;
|
||||
sph_keccak256_context keccak;
|
||||
sph_skein256_context skein;
|
||||
#ifdef NO_AES_NI
|
||||
sph_groestl256_context groestl;
|
||||
#else
|
||||
#if defined(__AES__)
|
||||
hashState_groestl256 groestl;
|
||||
#else
|
||||
sph_groestl256_context groestl;
|
||||
#endif
|
||||
} lyra2re_ctx_holder;
|
||||
|
||||
@@ -33,10 +32,10 @@ void init_lyra2re_ctx()
|
||||
sph_blake256_init(&lyra2re_ctx.blake);
|
||||
sph_keccak256_init(&lyra2re_ctx.keccak);
|
||||
sph_skein256_init(&lyra2re_ctx.skein);
|
||||
#ifdef NO_AES_NI
|
||||
sph_groestl256_init(&lyra2re_ctx.groestl);
|
||||
#else
|
||||
#if defined(__AES__)
|
||||
init_groestl256( &lyra2re_ctx.groestl, 32 );
|
||||
#else
|
||||
sph_groestl256_init(&lyra2re_ctx.groestl);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -72,11 +71,11 @@ void lyra2re_hash(void *state, const void *input)
|
||||
sph_skein256(&ctx.skein, hashA, 32);
|
||||
sph_skein256_close(&ctx.skein, hashB);
|
||||
|
||||
#ifdef NO_AES_NI
|
||||
#if defined(__AES__)
|
||||
update_and_final_groestl256( &ctx.groestl, hashA, hashB, 256 );
|
||||
#else
|
||||
sph_groestl256( &ctx.groestl, hashB, 32 );
|
||||
sph_groestl256_close( &ctx.groestl, hashA );
|
||||
#else
|
||||
update_and_final_groestl256( &ctx.groestl, hashA, hashB, 256 );
|
||||
#endif
|
||||
|
||||
memcpy(state, hashA, 32);
|
||||
|
||||
Reference in New Issue
Block a user