pub struct Prk(_);
Expand description
A HKDF PRK (pseudorandom key).
Implementations§
source§impl Prk
impl Prk
sourcepub fn new_less_safe(algorithm: Algorithm, value: &[u8]) -> Self
pub fn new_less_safe(algorithm: Algorithm, value: &[u8]) -> Self
Construct a new Prk
directly with the given value.
Usually one can avoid using this. It is useful when the application
intentionally wants to leak the PRK secret, e.g. to implement
SSLKEYLOGFILE
functionality.
sourcepub fn expand<'a, L: KeyType>(
&'a self,
info: &'a [&'a [u8]],
len: L
) -> Result<Okm<'a, L>, Unspecified>
pub fn expand<'a, L: KeyType>( &'a self, info: &'a [&'a [u8]], len: L ) -> Result<Okm<'a, L>, Unspecified>
The HKDF-Expand operation.
Fails if (and only if) len
is too large.