mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Add ChaCha20 encryption option (XOR)
This commit is contained in:
parent
a6d7026a45
commit
2bc2b8b49a
5 changed files with 185 additions and 16 deletions
|
|
@ -652,7 +652,7 @@ std::vector<unsigned char> FastRandomContext::randbytes(size_t len)
|
|||
if (requires_seed) RandomSeed();
|
||||
std::vector<unsigned char> ret(len);
|
||||
if (len > 0) {
|
||||
rng.Output(&ret[0], len);
|
||||
rng.Keystream(&ret[0], len);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue