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.
§Panics
Panics if the given Prk length exceeds the limit
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.
§Errors
Returns error::Unspecified
if:
len
is more than 255 times the digest algorithm’s output length.
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