Skip to main content

Module backup

Module backup 

Source
Expand description

A backup RNG, independent of other known sources.

Not necessarily strong, but hopefully random enough to cause an attacker some trouble in the event of catastrophic failure.

A failure from this RNG does not cause a panic.

Re-exportsยง

use rand::TryRng; ๐Ÿ”’
use rand_chacha::ChaCha20Rng; ๐Ÿ”’
use reseeding_rng::ReseedingRng; ๐Ÿ”’
use std::convert::Infallible; ๐Ÿ”’
use std::sync::LazyLock; ๐Ÿ”’
use std::sync::Mutex; ๐Ÿ”’
use std::sync::MutexGuard; ๐Ÿ”’

Staticsยง

JITTER_BACKUP ๐Ÿ”’
Static instance of our BackupRng; None if we failed to construct one.

Functionsยง

backup_rng ๐Ÿ”’
Return a MutexGuard for our backup rng, or None if we couldnโ€™t construct one.
new_backup_rng ๐Ÿ”’
Construct a new instance of our backup Rng; return None on failure.

Type Aliasesยง

BackupRng ๐Ÿ”’
The type weโ€™ve chosen to use for our backup Rng.