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§
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.