pub struct Prk(/* private fields */);
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Prk
impl RefUnwindSafe for Prk
impl Send for Prk
impl Sync for Prk
impl Unpin for Prk
impl UnwindSafe for Prk
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more