pub struct HmacSha512_256 { /* private fields */ }Expand description
HMAC-SHA-512/256.
Keys of any length are accepted. Served by the driver registered for
it; see driver.
§Example
ⓘ
let tag = HmacSha512_256::mac(b"my key", b"hello world");
// Verification, in constant time:
let mut mac = HmacSha512_256::new(b"my key");
mac.update(b"hello world");
mac.verify(&tag).unwrap();Implementations§
Source§impl HmacSha512_256
impl HmacSha512_256
Sourcepub const OUTPUT_SIZE: usize = 32
pub const OUTPUT_SIZE: usize = 32
Size of the tag, in bytes.
Trait Implementations§
Source§impl Clone for HmacSha512_256
impl Clone for HmacSha512_256
Source§fn clone(&self) -> HmacSha512_256
fn clone(&self) -> HmacSha512_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 moreAuto Trait Implementations§
impl !RefUnwindSafe for HmacSha512_256
impl !Unpin for HmacSha512_256
impl !UnwindSafe for HmacSha512_256
impl Freeze for HmacSha512_256
impl Send for HmacSha512_256
impl Sync for HmacSha512_256
impl UnsafeUnpin for HmacSha512_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