This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use crate::Error; | |
use core::arch::x86_64::_rdrand64_step; | |
use core::mem; | |
use core::num::NonZeroU32; | |
// Recommendation from "Intel® Digital Random Number Generator (DRNG) Software | |
// Implementation Guide" - Section 5.2.1 and "Intel® 64 and IA-32 Architectures | |
// Software Developer’s Manual" - Volume 1 - Section 7.3.17.1. | |
const RETRY_LIMIT: usize = 10; | |
const WORD_SIZE: usize = mem::size_of::<u64>(); |