This commit is contained in:
Jay D Dee
2017-04-16 12:55:19 -04:00
parent 9afa0d9820
commit 53259692eb
31 changed files with 211 additions and 3934 deletions

View File

@@ -12,7 +12,7 @@
#include "aes_ni/hash-groestl.h"
#endif
#if defined (SHA_NI)
#if defined __SHA__
#include <openssl/sha.h>
#else
#include "algo/sha/sph_sha2.h"
@@ -24,7 +24,7 @@ typedef struct {
#else
hashState_groestl groestl;
#endif
#if defined (SHA_NI)
#if defined __SHA__
SHA256_CTX sha;
#else
sph_sha256_context sha;
@@ -40,7 +40,7 @@ void init_myrgr_ctx()
#else
init_groestl (&myrgr_ctx.groestl, 64 );
#endif
#if defined (SHA_NI)
#if defined __SHA__
SHA256_Init( &myrgr_ctx.sha );
#else
sph_sha256_init( &myrgr_ctx.sha );
@@ -61,7 +61,7 @@ void myriadhash( void *output, const void *input )
(const char*)input, 640 );
#endif
#if defined (SHA_NI)
#if defined __SHA__
SHA256_Update( &ctx.sha, hash, 64 );
SHA256_Final( (unsigned char*) hash, &ctx.sha );
#else