fixed_alias_rng

Macro fixed_alias_rng 

Source
macro_rules! fixed_alias_rng {
    ($vis:vis $name:ident, $size:literal) => { ... };
}
Expand description

Creates a type alias for a random-only fixed-size secret.

This macro generates a type alias to FixedRng<N>, which can only be instantiated via .generate() (requires the “rand” feature).

§Examples

use secure_gate::fixed_alias_rng;
fixed_alias_rng!(pub MasterKey, 32);
let key = MasterKey::generate();
assert_eq!(key.len(), 32);