aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/rng/stateful_rng
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-05-08 07:24:50 -0400
committerJack Lloyd <[email protected]>2020-05-08 08:31:06 -0400
commitad851c2047273d3317cbdc88cefaa1c3aaa61ee2 (patch)
tree95119539acb70860525c7adc51893fd4e6731d79 /src/lib/rng/stateful_rng
parent0ad3c8a4aac6a8a19ff71323eb1a7adb5fae2dee (diff)
Add Processor_RNG
Replaces RDRAND_RNG, RDRAND entropy source, and DARN entropy source. Provides also DARN-based RNG interface. This also gives an easy path for supporting the ARMv8 RNG instructions.
Diffstat (limited to 'src/lib/rng/stateful_rng')
-rw-r--r--src/lib/rng/stateful_rng/stateful_rng.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/rng/stateful_rng/stateful_rng.cpp b/src/lib/rng/stateful_rng/stateful_rng.cpp
index 1587e50f8..10b3ab84b 100644
--- a/src/lib/rng/stateful_rng/stateful_rng.cpp
+++ b/src/lib/rng/stateful_rng/stateful_rng.cpp
@@ -8,8 +8,8 @@
#include <botan/internal/os_utils.h>
#include <botan/loadstor.h>
-#if defined(BOTAN_HAS_RDRAND_RNG)
- #include <botan/rdrand_rng.h>
+#if defined(BOTAN_HAS_PROCESSOR_RNG)
+ #include <botan/processor_rng.h>
#endif
namespace Botan {
@@ -46,11 +46,11 @@ void Stateful_RNG::randomize_with_ts_input(uint8_t output[], size_t output_len)
store_le(OS::get_high_resolution_clock(), additional_input);
-#if defined(BOTAN_HAS_RDRAND_RNG)
- if(RDRAND_RNG::available())
+#if defined(BOTAN_HAS_PROCESSOR_RNG)
+ if(Processor_RNG::available())
{
- RDRAND_RNG rdrand;
- rdrand.randomize(additional_input + 8, sizeof(additional_input) - 8);
+ Processor_RNG hwrng;
+ hwrng.randomize(additional_input + 8, sizeof(additional_input) - 8);
}
else
#endif