diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2023-02-22 12:55:12 -0800 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2023-02-22 12:55:12 -0800 |
| commit | 2c2fb869a22130aafbcc2e5b2586342f9854d5e1 (patch) | |
| tree | fc9f904352720e39d364478b51dfc3ddc2e9766c /Source/Core/Common/Random.h | |
| parent | ebd98226db78aeac5d8d4d1afb87e673989e2a04 (diff) | |
use std-provided randomness for JitArm64 unittests
decreases runtime significantly and lessens dependency on mbedtls
Diffstat (limited to 'Source/Core/Common/Random.h')
| -rw-r--r-- | Source/Core/Common/Random.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/Source/Core/Common/Random.h b/Source/Core/Common/Random.h index f8c0c2a7b5..86192f840f 100644 --- a/Source/Core/Common/Random.h +++ b/Source/Core/Common/Random.h @@ -11,30 +11,6 @@ namespace Common::Random { -/// Cryptographically secure pseudo-random number generator, with explicit seed. -class PRNG final -{ -public: - explicit PRNG(u64 seed) : PRNG(&seed, sizeof(u64)) {} - PRNG(void* seed, std::size_t size); - ~PRNG(); - - void Generate(void* buffer, std::size_t size); - - template <typename T> - T GenerateValue() - { - static_assert(std::is_arithmetic<T>(), "T must be an arithmetic type in GenerateValue."); - T value; - Generate(&value, sizeof(value)); - return value; - } - -private: - struct Impl; - std::unique_ptr<Impl> m_impl; -}; - /// Fill `buffer` with random bytes using a cryptographically secure pseudo-random number generator. void Generate(void* buffer, std::size_t size); |
