mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Generic PRNG framework:
* A new, unified interface for generating random numbers and filling buffers supporting any engine that fits the UniformRandomNumberGenerator concept; * Automatically seeded replacement for rand using the fast xorshift+ PRNG engine; * A CSPRNG engine that can be used with the new framework when needing to to generate cryptographically secure randomness. * Unit test cleanups to work with new engine.
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
#include <ripple/shamap/Family.h>
|
||||
#include <ripple/unity/git_id.h>
|
||||
#include <ripple/websocket/MakeServer.h>
|
||||
#include <ripple/crypto/RandomNumbers.h>
|
||||
#include <ripple/crypto/csprng.h>
|
||||
#include <beast/asio/io_latency_probe.h>
|
||||
#include <beast/module/core/text/LexicalCast.h>
|
||||
#include <beast/module/core/thread/DeadlineTimer.h>
|
||||
@@ -844,7 +844,7 @@ public:
|
||||
{
|
||||
if (timer == m_entropyTimer)
|
||||
{
|
||||
add_entropy (nullptr, 0);
|
||||
crypto_prng().mix_entropy ();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user