Module hkdf

Module hkdf 

Source
Expand description

HMAC Key Derivation Function (HKDF)

This module implements the HMAC-based Extract-and-Expand Key Derivation Function as specified by 1

§Examples

use cryptoxide::{sha2::Sha256, hkdf::{hkdf_extract, hkdf_expand}};

let salt = b"salt";
let input = b"input";
let mut prk = [0u8; 32];
hkdf_extract(Sha256::new(), salt, input, &mut prk);

Functions§

hkdf_expand
Execute the HKDF-Expand function. Applications MUST NOT use this for password hashing.
hkdf_extract
Execute the HKDF-Extract function. Applications MUST NOT use this for password hashing.