mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Bench test for EllSwift ECDH
Co-authored-by: Dhruv Mehta <856960+dhruv@users.noreply.github.com>
This commit is contained in:
parent
42d759f239
commit
3168b08043
4 changed files with 61 additions and 0 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue