pub fn try_hardware_rng(dest: &mut [u8; 32]) -> boolExpand description
Attempt to read 32 bytes from a hardware random number generator.
Returns true if the hardware RNG was available and dest was filled,
false if hardware RNG is unavailable (in which case dest is unmodified).
- x86_64: Uses
RDRANDinstruction with retry logic. Falls back tofalseif the CPU does not support RDRAND (checked via CPUID). - AArch64/RISC-V: No dedicated hardware RNG; always returns
false.