pub struct HmacSha384(/* private fields */);Expand description
HMAC-SHA384.
Implementations§
Source§impl HmacSha384
impl HmacSha384
Sourcepub fn mac(key: &[u8], data: &[u8]) -> [u8; 48]
pub fn mac(key: &[u8], data: &[u8]) -> [u8; 48]
Computes the HMAC-SHA384 of data as a one-shot operation.
Sourcepub fn new_from_slice(key: &[u8]) -> Self
pub fn new_from_slice(key: &[u8]) -> Self
Creates a new HMAC-SHA384 operation from a variable-length key.
Sourcepub fn verify_slice(self, tag: &[u8]) -> Result<(), InvalidSignatureError>
pub fn verify_slice(self, tag: &[u8]) -> Result<(), InvalidSignatureError>
Checks that the provided tag value matches the computed HMAC value.
Sourcepub fn verify(self, tag: &[u8; 48]) -> Result<(), InvalidSignatureError>
pub fn verify(self, tag: &[u8; 48]) -> Result<(), InvalidSignatureError>
Checks that the provided tag value matches the computed HMAC value.
Sourcepub fn verify_truncated_left(
self,
tag: &[u8],
) -> Result<(), InvalidSignatureError>
pub fn verify_truncated_left( self, tag: &[u8], ) -> Result<(), InvalidSignatureError>
Checks that the provided tag value matches the computed HMAC, truncated to the input tag’s length.
Truncating an HMAC reduces the security of the construction. Callers must ensure tag’s
length matches the desired HMAC length and security level.
Trait Implementations§
Auto Trait Implementations§
impl !Send for HmacSha384
impl !Sync for HmacSha384
impl Freeze for HmacSha384
impl RefUnwindSafe for HmacSha384
impl Unpin for HmacSha384
impl UnsafeUnpin for HmacSha384
impl UnwindSafe for HmacSha384
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