From: fsb4000 Date: Sat, 4 Apr 2015 18:46:14 +0000 (+0600) Subject: fix issue 192 X-Git-Tag: nvc-v0.5.3~50^2 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=c105930bd90825998555997fa2a7b9ee8e118dc2 fix issue 192 --- diff --git a/src/scrypt-sse2.cpp b/src/scrypt-sse2.cpp index 94987a6..1f56367 100644 --- a/src/scrypt-sse2.cpp +++ b/src/scrypt-sse2.cpp @@ -122,7 +122,8 @@ uint256 scrypt_blockhash__sse2(const uint8_t* input) V = (__m128i *)(((uintptr_t)(scratchpad) + 63) & ~ (uintptr_t)(63)); - PKCS5_PBKDF2_HMAC((const int8_t *)input, 80, (const int8_t *)input, 80, 1, EVP_sha256(), 128, B); + void *const tmp = const_cast(input); + PKCS5_PBKDF2_HMAC(static_cast(tmp), 80, input, 80, 1, EVP_sha256(), 128, B); for (k = 0; k < 2; k++) { for (i = 0; i < 16; i++) { @@ -150,7 +151,7 @@ uint256 scrypt_blockhash__sse2(const uint8_t* input) } } - PKCS5_PBKDF2_HMAC((const int8_t *)input, 80, B, 128, 1, EVP_sha256(), 32, (int8_t*)&result); + PKCS5_PBKDF2_HMAC(static_cast(tmp), 80, B, 128, 1, EVP_sha256(), 32, (unsigned char*)&result); return result; }