mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.11.5
This commit is contained in:
@@ -7,19 +7,19 @@
|
||||
#include "algo/jh//sph_jh.h"
|
||||
#include "algo/keccak/sph_keccak.h"
|
||||
|
||||
#ifdef NO_AES_NI
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#else
|
||||
#ifdef __AES__
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#else
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
sph_jh512_context jh;
|
||||
sph_keccak512_context keccak;
|
||||
#ifdef NO_AES_NI
|
||||
sph_echo512_context echo;
|
||||
#else
|
||||
#ifdef __AES__
|
||||
hashState_echo echo;
|
||||
#else
|
||||
sph_echo512_context echo;
|
||||
#endif
|
||||
} tribus_ctx_holder;
|
||||
|
||||
@@ -29,10 +29,10 @@ bool tribus_thread_init()
|
||||
{
|
||||
sph_jh512_init( &tribus_ctx.jh );
|
||||
sph_keccak512_init( &tribus_ctx.keccak );
|
||||
#ifdef NO_AES_NI
|
||||
sph_echo512_init( &tribus_ctx.echo );
|
||||
#else
|
||||
#ifdef __AES__
|
||||
init_echo( &tribus_ctx.echo, 512 );
|
||||
#else
|
||||
sph_echo512_init( &tribus_ctx.echo );
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
@@ -49,12 +49,12 @@ void tribus_hash(void *state, const void *input)
|
||||
sph_keccak512( &ctx.keccak, (const void*) hash, 64 );
|
||||
sph_keccak512_close( &ctx.keccak, (void*) hash );
|
||||
|
||||
#ifdef NO_AES_NI
|
||||
sph_echo512( &ctx.echo, hash, 64 );
|
||||
sph_echo512_close (&ctx.echo, hash );
|
||||
#else
|
||||
#ifdef __AES__
|
||||
update_final_echo( &ctx.echo, (BitSequence *) hash,
|
||||
(const BitSequence *) hash, 512 );
|
||||
#else
|
||||
sph_echo512( &ctx.echo, hash, 64 );
|
||||
sph_echo512_close (&ctx.echo, hash );
|
||||
#endif
|
||||
|
||||
memcpy(state, hash, 32);
|
||||
|
Reference in New Issue
Block a user