mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Bench test for EllSwift ECDH
Co-authored-by: Dhruv Mehta <856960+dhruv@users.noreply.github.com>
This commit is contained in:
@@ -599,6 +599,12 @@ std::vector<unsigned char> FastRandomContext::randbytes(size_t len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void FastRandomContext::fillrand(Span<std::byte> output)
|
||||
{
|
||||
if (requires_seed) RandomSeed();
|
||||
rng.Keystream(UCharCast(output.data()), output.size());
|
||||
}
|
||||
|
||||
FastRandomContext::FastRandomContext(const uint256& seed) noexcept : requires_seed(false), bitbuf_size(0)
|
||||
{
|
||||
rng.SetKey32(seed.begin());
|
||||
|
||||
Reference in New Issue
Block a user