SecureRandomExt

Trait SecureRandomExt 

Source
pub trait SecureRandomExt {
    // Required method
    fn random() -> Self;
}
Expand description

Extension trait – gives .random() to all fixed-size secret types

Required Methods§

Source

fn random() -> Self

Generate a cryptographically secure random instance of this type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<const N: usize> SecureRandomExt for Fixed<[u8; N]>

Blanket impl – every Fixed<[u8; N]> (i.e. every fixed_alias! type) gets .random()

Source§

fn random() -> Self

Implementors§