mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix extra increment in GenerateRootDeterministicKey
This commit is contained in:
@@ -100,7 +100,6 @@ ec_key GenerateRootDeterministicKey (uint128 const& seed)
|
||||
std::array<std::uint8_t, 20> buf;
|
||||
std::copy(seed.begin(), seed.end(), buf.begin());
|
||||
copy_uint32 (buf.begin() + 16, seq++);
|
||||
++seq;
|
||||
uint256 root = getSHA512Half (buf.data(), buf.size());
|
||||
std::fill (buf.begin(), buf.end(), 0); // security erase
|
||||
privKey = BN_bin2bn ((const unsigned char*) &root, sizeof (root), privKey);
|
||||
|
||||
Reference in New Issue
Block a user