Skip to content

Commit

Permalink
use data_size() for sha256 length
Browse files Browse the repository at this point in the history
  • Loading branch information
spoonincode committed Sep 6, 2023
1 parent fffa8f9 commit b832c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/libfc/src/crypto/elliptic_secp256k1.cpp
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit b832c7e

Please sign in to comment.