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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 160 bytes