MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / test_prng_random_seed

Function test_prng_random_seed

ciphercore-base/src/random.rs:399–409  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

397
398 #[test]
399 fn test_prng_random_seed() {
400 let mut prng = PRNG::new(None).unwrap();
401 let mut counters = [0; 256];
402 let n = 10_000_001;
403 let rand_bytes = prng.get_random_bytes(n).unwrap();
404 for byte in rand_bytes {
405 counters[byte as usize] += 1;
406 }
407
408 assert!(entropy_test(counters, n as u64));
409 }
410
411 #[test]
412 fn test_prng_random_value() {

Callers

nothing calls this directly

Calls 1

get_random_bytesMethod · 0.80

Tested by

no test coverage detected