Skip to main content

SaltGenerator

Trait SaltGenerator 

Source
pub trait SaltGenerator {
    // Required method
    fn next_salt(&mut self) -> Result<[u8; 16], Error>;
}
Expand description

Source of 128-bit salts for issuance helpers.

The crate does not generate randomness. Issuers pass an implementation that returns one fresh, unpredictable 16-byte salt for each redacted claim, redacted array element, or decoy.

Required Methods§

Source

fn next_salt(&mut self) -> Result<[u8; 16], Error>

Returns the next 16-byte salt.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> SaltGenerator for F
where F: FnMut() -> [u8; 16],