aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/rng/stateful_rng/stateful_rng.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/rng/stateful_rng/stateful_rng.cpp
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff)
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
Diffstat (limited to 'src/lib/rng/stateful_rng/stateful_rng.cpp')
-rw-r--r--src/lib/rng/stateful_rng/stateful_rng.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/rng/stateful_rng/stateful_rng.cpp b/src/lib/rng/stateful_rng/stateful_rng.cpp
index 1349c1208..81fe89cca 100644
--- a/src/lib/rng/stateful_rng/stateful_rng.cpp
+++ b/src/lib/rng/stateful_rng/stateful_rng.cpp
@@ -26,7 +26,7 @@ bool Stateful_RNG::is_seeded() const
return m_reseed_counter > 0;
}
-void Stateful_RNG::initialize_with(const byte input[], size_t len)
+void Stateful_RNG::initialize_with(const uint8_t input[], size_t len)
{
add_entropy(input, len);
@@ -36,9 +36,9 @@ void Stateful_RNG::initialize_with(const byte input[], size_t len)
}
}
-void Stateful_RNG::randomize_with_ts_input(byte output[], size_t output_len)
+void Stateful_RNG::randomize_with_ts_input(uint8_t output[], size_t output_len)
{
- byte additional_input[24] = { 0 };
+ uint8_t additional_input[24] = { 0 };
store_le(OS::get_system_timestamp_ns(), additional_input);
store_le(OS::get_processor_timestamp(), additional_input + 8);
store_le(m_last_pid, additional_input + 16);