Enum orion::hkdf::Hkdf
[−]
[src]
pub enum Hkdf {
hmac_SHA1,
hmac_SHA256,
hmac_SHA384,
hmac_SHA512,
}HKDF (HMAC-based Extract-and-Expand Key Derivation Function) as specified in the RFC 5869.
Variants
hmac_SHA1hmac_SHA256hmac_SHA384hmac_SHA512
Methods
impl Hkdf[src]
HKDF (HMAC-based Extract-and-Expand Key Derivation Function) as specified in the RFC 5869.
Usage examples:
use orion::hkdf::Hkdf; use orion::functions; let key = functions::gen_rand_key(10); let salt = functions::gen_rand_key(10); let info = functions::gen_rand_key(10); let prk = Hkdf::hmac_SHA512.hkdf_extract(&salt, &key); let d_key = Hkdf::hmac_SHA512.hkdf_expand(&prk, &info, 50);