mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.15.0
This commit is contained in:
@@ -14,16 +14,17 @@
|
||||
#include "algo/skein/sph_skein.h"
|
||||
#include "algo/shavite/sph_shavite.h"
|
||||
#include "algo/hamsi/sph_hamsi.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#include "algo/cubehash/cubehash_sse2.h"
|
||||
#include "algo/simd/nist.h"
|
||||
|
||||
#if defined(__AES__)
|
||||
#include "algo/echo/aes_ni/hash_api.h"
|
||||
#include "algo/groestl/aes_ni/hash-groestl.h"
|
||||
#include "algo/fugue/fugue-aesni.h"
|
||||
#else
|
||||
#include "algo/groestl/sph_groestl.h"
|
||||
#include "algo/echo/sph_echo.h"
|
||||
#include "algo/fugue/sph_fugue.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
@@ -32,9 +33,11 @@ typedef struct {
|
||||
#if defined(__AES__)
|
||||
hashState_echo echo;
|
||||
hashState_groestl groestl;
|
||||
hashState_fugue fugue;
|
||||
#else
|
||||
sph_groestl512_context groestl;
|
||||
sph_echo512_context echo;
|
||||
sph_fugue512_context fugue;
|
||||
#endif
|
||||
sph_jh512_context jh;
|
||||
sph_keccak512_context keccak;
|
||||
@@ -43,7 +46,6 @@ typedef struct {
|
||||
sph_shavite512_context shavite;
|
||||
hashState_sd simd;
|
||||
sph_hamsi512_context hamsi;
|
||||
sph_fugue512_context fugue;
|
||||
sm3_ctx_t sm3;
|
||||
} x13bcd_ctx_holder;
|
||||
|
||||
@@ -56,9 +58,11 @@ void init_x13bcd_ctx()
|
||||
#if defined(__AES__)
|
||||
init_groestl( &x13bcd_ctx.groestl, 64 );
|
||||
init_echo( &x13bcd_ctx.echo, 512 );
|
||||
fugue512_Init( &x13bcd_ctx.fugue, 512 );
|
||||
#else
|
||||
sph_groestl512_init( &x13bcd_ctx.groestl );
|
||||
sph_echo512_init( &x13bcd_ctx.echo );
|
||||
sph_fugue512_init( &x13bcd_ctx.fugue );
|
||||
#endif
|
||||
sph_skein512_init( &x13bcd_ctx.skein );
|
||||
sph_jh512_init( &x13bcd_ctx.jh );
|
||||
@@ -68,7 +72,6 @@ void init_x13bcd_ctx()
|
||||
init_sd( &x13bcd_ctx.simd,512 );
|
||||
sm3_init( &x13bcd_ctx.sm3 );
|
||||
sph_hamsi512_init( &x13bcd_ctx.hamsi );
|
||||
sph_fugue512_init( &x13bcd_ctx.fugue );
|
||||
};
|
||||
|
||||
void x13bcd_hash(void *output, const void *input)
|
||||
@@ -129,8 +132,13 @@ void x13bcd_hash(void *output, const void *input)
|
||||
sph_hamsi512( &ctx.hamsi, hash, 64 );
|
||||
sph_hamsi512_close( &ctx.hamsi, hash );
|
||||
|
||||
#if defined(__AES__)
|
||||
fugue512_Update( &ctx.fugue, hash, 512 );
|
||||
fugue512_Final( &ctx.fugue, hash );
|
||||
#else
|
||||
sph_fugue512( &ctx.fugue, hash, 64 );
|
||||
sph_fugue512_close( &ctx.fugue, hash );
|
||||
#endif
|
||||
|
||||
memcpy( output, hash, 32 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user