Function derive_key

Source
pub fn derive_key<D>(
    secret: &[u8],
    other_info: &[u8],
    length: usize,
) -> Result<Vec<u8>, Error>
Available on crate feature std only.
Expand description

Derives and returns length bytes key from secret and other_info.

let key = concat_kdf::derive_key::<sha2::Sha256>(b"top-secret", b"info", 42).unwrap();