Litecoin: Adapt scrypt code to C++
This commit is contained in:
parent
2acab1baf1
commit
d6e580d43f
@ -73,11 +73,11 @@ typedef struct HMAC_SHA256Context {
|
||||
|
||||
/* Initialize an HMAC-SHA256 operation with the given key. */
|
||||
static void
|
||||
HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const unsigned char *_K, size_t Klen)
|
||||
HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const void *_K, size_t Klen)
|
||||
{
|
||||
unsigned char pad[64];
|
||||
unsigned char khash[32];
|
||||
const unsigned char *K = _K;
|
||||
const unsigned char *K = (const unsigned char *)_K;
|
||||
size_t i;
|
||||
|
||||
/* If Klen > 64, the key is really SHA256(K). */
|
||||
|
||||
10
src/scrypt.h
10
src/scrypt.h
@ -1,17 +1,9 @@
|
||||
#ifndef SCRYPT_H
|
||||
#define SCRYPT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SCRYPT_SCRATCHPAD_SIZE (131072 + 63)
|
||||
static const int SCRYPT_SCRATCHPAD_SIZE = 131072 + 63;
|
||||
|
||||
void scrypt_1024_1_1_256_sp(const char *input, char *output, char *scratchpad);
|
||||
void scrypt_1024_1_1_256(const char *input, char *output);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user