Struct crypto_mac::Output
source · [−]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
sourceimpl<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
sourceimpl<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> RefUnwindSafe for Output<M> where
<<M as Mac>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<M> Send for Output<M>
impl<M> Sync for Output<M>
impl<M> Unpin for Output<M> where
<<M as Mac>::OutputSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<M> UnwindSafe for Output<M> where
<<M as Mac>::OutputSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more