Upgraded to OpenSSL 1.1.0+
This commit is contained in:
parent
b0bd473e96
commit
046dc79a04
|
@ -6,7 +6,7 @@ Cryptocurrencies portfolio manager.
|
|||
|
||||
* MySQL
|
||||
* C++ REST SDK : https://github.com/Microsoft/cpprestsdk
|
||||
* OpenSSL
|
||||
* OpenSSL (1.1.0+)
|
||||
* GMP
|
||||
* Boost
|
||||
* sqlpp11 (modified to handle decimal type) : https://github.com/evilny0/sqlpp11/tree/decimal
|
||||
|
|
|
@ -222,14 +222,13 @@ vector<unsigned char> ExchangeHandlerKraken::hmac_sha512(const vector<unsigned c
|
|||
unsigned int len = EVP_MAX_MD_SIZE;
|
||||
vector<unsigned char> digest(len);
|
||||
|
||||
HMAC_CTX ctx;
|
||||
HMAC_CTX_init(&ctx);
|
||||
HMAC_CTX* ctx = HMAC_CTX_new();
|
||||
|
||||
HMAC_Init_ex(&ctx, key.data(), key.size(), EVP_sha512(), NULL);
|
||||
HMAC_Update(&ctx, data.data(), data.size());
|
||||
HMAC_Final(&ctx, digest.data(), &len);
|
||||
HMAC_Init_ex(ctx, key.data(), key.size(), EVP_sha512(), NULL);
|
||||
HMAC_Update(ctx, data.data(), data.size());
|
||||
HMAC_Final(ctx, digest.data(), &len);
|
||||
|
||||
HMAC_CTX_cleanup(&ctx);
|
||||
HMAC_CTX_free(ctx);
|
||||
|
||||
return digest;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user