pub struct Kdf { /* private fields */ }
Implementations§
Methods from Deref<Target = MdRef>§
Sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
Returns the block size of the digest in bytes.
This corresponds to EVP_MD_block_size
.
Sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
Returns the size of the digest in bytes.
This corresponds to EVP_MD_size
.
Sourcepub fn type_(&self) -> Nid
pub fn type_(&self) -> Nid
Returns the Nid
of the digest.
This corresponds to EVP_MD_type
.
Trait Implementations§
Source§impl KdfType for Kdf
impl KdfType for Kdf
Source§fn expand(
&self,
prk: &[u8],
info: &[u8],
len: usize,
) -> Result<Vec<u8>, KdfError>
fn expand( &self, prk: &[u8], info: &[u8], len: usize, ) -> Result<Vec<u8>, KdfError>
§Warning
The length of info can not exceed 1024 bytes when using the OpenSSL Engine due to underlying restrictions in OpenSSL. This function will throw an OpensslError in the event info is > 1024 bytes.
type Error = KdfError
fn extract(&self, salt: &[u8], ikm: &[u8]) -> Result<Vec<u8>, KdfError>
fn extract_size(&self) -> usize
Auto Trait Implementations§
impl Freeze for Kdf
impl !RefUnwindSafe for Kdf
impl Send for Kdf
impl Sync for Kdf
impl Unpin for Kdf
impl !UnwindSafe for Kdf
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more