pub struct MacResult { /* private fields */ }
Expand description
A MacResult wraps a Mac code and provides a safe Eq implementation that runs in fixed time.
Implementations
sourceimpl MacResult
impl MacResult
sourcepub fn new_from_owned(code: Vec<u8>) -> MacResult
pub fn new_from_owned(code: Vec<u8>) -> MacResult
Create a new MacResult taking ownership of the specified code value.
sourcepub fn code<'s>(&'s self) -> &'s [u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
pub fn code<'s>(&'s self) -> &'s [u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
Get the code value. Be very careful using this method, since incorrect use of the code value may permit timing attacks which defeat the security provided by the Mac function.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MacResult
impl Send for MacResult
impl Sync for MacResult
impl Unpin for MacResult
impl UnwindSafe for MacResult
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more