rdseed 0.1.0-beta.11

Rust interface for RDRAND / RDSEED CPU instructions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This is free and unencumbered software released into the public domain.
// SPDX-License-Identifier: CC0-1.0 OR Unlicense

#[test]
#[ignore]
fn can_rdseed64_fail() {
   let mut failed = false;
   for _ in 0..30_000_000 {
      let rc = rdseed::get64();
      if rc.is_none() {
         failed = true;
      }
   }
   assert! ( failed == false, "we expected some rdseed64 calls to fail but none did.");
}