mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.7.2
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
#include "algo-gate-api.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "sph_skein.h"
|
||||
|
||||
#if defined __SHA__
|
||||
#include <openssl/sha.h>
|
||||
#else
|
||||
#include "algo/sha/sph_sha2.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
sph_skein512_context skein;
|
||||
#if defined __SHA__
|
||||
#ifndef USE_SPH_SHA
|
||||
SHA256_CTX sha256;
|
||||
#else
|
||||
sph_sha256_context sha256;
|
||||
@@ -25,7 +19,7 @@ skein_ctx_holder skein_ctx;
|
||||
void init_skein_ctx()
|
||||
{
|
||||
sph_skein512_init( &skein_ctx.skein );
|
||||
#if defined __SHA__
|
||||
#ifndef USE_SPH_SHA
|
||||
SHA256_Init( &skein_ctx.sha256 );
|
||||
#else
|
||||
sph_sha256_init( &skein_ctx.sha256 );
|
||||
@@ -41,7 +35,7 @@ void skeinhash(void *state, const void *input)
|
||||
sph_skein512( &ctx.skein, input, 80 );
|
||||
sph_skein512_close( &ctx.skein, hash );
|
||||
|
||||
#if defined __SHA__
|
||||
#ifndef USE_SPH_SHA
|
||||
SHA256_Update( &ctx.sha256, hash, 64 );
|
||||
SHA256_Final( (unsigned char*) hash, &ctx.sha256 );
|
||||
#else
|
||||
|
Reference in New Issue
Block a user