pub enum HashAlg {
Sha256,
Sha384,
Sha512,
}Expand description
A hash function chosen at run time (cipher suites, signature schemes, certificates).
Variants§
Implementations§
Source§impl HashAlg
impl HashAlg
pub const fn output_len(self) -> usize
pub fn hash(self, data: &[u8]) -> Output
Sourcepub fn hkdf_extract(self, salt: &[u8], ikm: &[u8]) -> Output
pub fn hkdf_extract(self, salt: &[u8], ikm: &[u8]) -> Output
HKDF-Extract; an empty salt means HashLen zero bytes.
Sourcepub fn hkdf_expand(self, prk: &[u8], info: &[&[u8]], out: &mut [u8])
pub fn hkdf_expand(self, prk: &[u8], info: &[&[u8]], out: &mut [u8])
HKDF-Expand into out (at most 255 * HashLen bytes).
Trait Implementations§
impl Copy for HashAlg
impl Eq for HashAlg
impl StructuralPartialEq for HashAlg
Auto Trait Implementations§
impl Forget for HashAlg
impl Freeze for HashAlg
impl Move for HashAlg
impl RefUnwindSafe for HashAlg
impl Send for HashAlg
impl Sync for HashAlg
impl Unpin for HashAlg
impl UnsafeUnpin for HashAlg
impl UnwindSafe for HashAlg
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