mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Introduced consensus round nonce and reintroduced stage 0. (#160)
* Reintroduced stage 0. * Introduced round nonce for reduced lcl predictability.
This commit is contained in:
@@ -131,6 +131,15 @@ namespace crypto
|
||||
decoded_pubkey + 1); // +1 to skip prefix byte.
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate random bytes of specified length.
|
||||
*/
|
||||
void random_bytes(std::string &result, const size_t len)
|
||||
{
|
||||
result.resize(len);
|
||||
randombytes_buf(result.data(), len);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate blake3 hash for a given message.
|
||||
* @param data String to hash.
|
||||
|
||||
Reference in New Issue
Block a user