Address review: use 'secure RNG' instead of 'hardware RNG' in comments

This commit is contained in:
J. Nick Koston
2026-03-19 13:35:43 -10:00
parent f02bf07630
commit 1b090e6b95
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ uint32_t fnv1_hash(const char *str) {
// SplitMix32 PRNG — MurmurHash3 finalizer with golden-ratio increment.
// Provides fast, uniform, non-cryptographic random numbers.
// Seeded lazily from the platform's hardware RNG via random_bytes().
// Seeded lazily from the platform's secure RNG via random_bytes().
// ESP8266 uses os_random() instead (defined in esp8266/helpers.cpp).
#ifndef USE_ESP8266
static uint32_t splitmix32_state; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
+1 -1
View File
@@ -849,7 +849,7 @@ uint32_t random_uint32();
/// Not thread-safe. Must only be called from the main loop.
/// Not suitable for cryptographic use; use random_bytes() instead.
float random_float();
/// Generate \p len number of random bytes from the platform's hardware RNG.
/// Generate \p len random bytes using the platform's secure RNG (hardware RNG or OS CSPRNG).
/// Thread-safe. Suitable for cryptographic use.
bool random_bytes(uint8_t *data, size_t len);