Skip to main content

fill

Function fill 

Source
pub fn fill(
    source: &Source,
    purpose: &str,
    buf: &mut [u8],
) -> Result<(), String>
Expand description

Fill buf with random bytes from source, mixed with OS entropy.

purpose is HKDF info — a label such as "secret" or "ssh-ed25519", so two generators asking for bytes in the same instant cannot receive the same stream.