From b832c7ede352cc556c5ea8bbb42efcdae7858216 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Tue, 5 Sep 2023 21:46:11 -0400 Subject: [PATCH] use data_size() for sha256 length --- libraries/libfc/src/crypto/elliptic_secp256k1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/libfc/src/crypto/elliptic_secp256k1.cpp b/libraries/libfc/src/crypto/elliptic_secp256k1.cpp index 9d490fcbe8..93d7fed8fb 100644 --- a/libraries/libfc/src/crypto/elliptic_secp256k1.cpp +++ b/libraries/libfc/src/crypto/elliptic_secp256k1.cpp @@ -85,7 +85,7 @@ namespace fc { namespace ecc { { private_key ret; do { - RAND_bytes((uint8_t*)ret.my->_key.data(), sizeof(ret.my->_key.data())); + RAND_bytes((uint8_t*)ret.my->_key.data(), ret.my->_key.data_size()); } while(!secp256k1_ec_seckey_verify(detail::_get_context(), (const uint8_t*)ret.my->_key.data())); return ret; }