pub struct HmacSha3_256;Expand description
HMAC-SHA3-256 message authentication code (32-byte tag).
Uses hmac::SimpleHmac because sha3 0.12’s types do not expose the
block-level CoreProxy trait required by hmac::Hmac<D>.
Trait Implementations§
Source§impl Clone for HmacSha3_256
impl Clone for HmacSha3_256
Source§fn clone(&self) -> HmacSha3_256
fn clone(&self) -> HmacSha3_256
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HmacSha3_256
impl Debug for HmacSha3_256
Source§impl Default for HmacSha3_256
impl Default for HmacSha3_256
Source§fn default() -> HmacSha3_256
fn default() -> HmacSha3_256
Returns the “default value” for a type. Read more
Source§impl Mac for HmacSha3_256
impl Mac for HmacSha3_256
Source§fn key_len(&self) -> usize
fn key_len(&self) -> usize
Required key length (minimum acceptable length; MACs are often variable).
Source§fn output_len(&self) -> usize
fn output_len(&self) -> usize
Output tag length in bytes.
Source§fn mac(&self, key: &[u8], msg: &[u8], out: &mut [u8]) -> Result<(), CryptoError>
fn mac(&self, key: &[u8], msg: &[u8], out: &mut [u8]) -> Result<(), CryptoError>
Compute a MAC tag for
msg under key and write it into out.Source§fn verify(&self, key: &[u8], msg: &[u8], tag: &[u8]) -> Result<(), CryptoError>
fn verify(&self, key: &[u8], msg: &[u8], tag: &[u8]) -> Result<(), CryptoError>
Verify a MAC tag in constant time. Read more
Source§fn mac_to_vec(&self, key: &[u8], msg: &[u8]) -> Result<Vec<u8>, CryptoError>
fn mac_to_vec(&self, key: &[u8], msg: &[u8]) -> Result<Vec<u8>, CryptoError>
Convenience: compute MAC and return the tag as a
Vec<u8>.impl Copy for HmacSha3_256
Auto Trait Implementations§
impl Freeze for HmacSha3_256
impl RefUnwindSafe for HmacSha3_256
impl Send for HmacSha3_256
impl Sync for HmacSha3_256
impl Unpin for HmacSha3_256
impl UnsafeUnpin for HmacSha3_256
impl UnwindSafe for HmacSha3_256
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