pub struct Output<M: Mac> { /* private fields */ }
Expand description
Output
is a thin wrapper around bytes array which provides a safe Eq
implementation that runs in a fixed time.
Implementations§
Source§impl<M: Mac> Output<M>
impl<M: Mac> Output<M>
Sourcepub fn new(bytes: GenericArray<u8, M::OutputSize>) -> Output<M>
pub fn new(bytes: GenericArray<u8, M::OutputSize>) -> Output<M>
Create a new MAC Output
.
Sourcepub fn into_bytes(self) -> GenericArray<u8, M::OutputSize>
pub fn into_bytes(self) -> GenericArray<u8, M::OutputSize>
Get the MAC tag/code value as a byte array.
Be very careful using this method, since incorrect use of the tag value
may permit timing attacks which defeat the security provided by the
Mac
trait.
Trait Implementations§
Source§impl<M: Mac> ConstantTimeEq for Output<M>
impl<M: Mac> ConstantTimeEq for Output<M>
impl<M: Mac> Eq for Output<M>
Auto Trait Implementations§
impl<M> Freeze for Output<M>
impl<M> RefUnwindSafe for Output<M>
impl<M> Send for Output<M>
impl<M> Sync for Output<M>
impl<M> Unpin for Output<M>
impl<M> UnwindSafe for Output<M>
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