pub enum Error {
InvalidKeyLen,
InvalidNonceLen,
NotInitialized,
AlreadyFinalized,
OutputBufferTooSmall {
needed: usize,
},
WrongInitVariant,
VerificationFailed,
}Expand description
Errors returned by Mac.
Variants§
InvalidKeyLen
CMAC / GMAC: the supplied key length does not match the algorithm.
InvalidNonceLen
GMAC: the supplied nonce length is not 12 bytes.
NotInitialized
update, sign or verify was called before Mac::init.
AlreadyFinalized
update, sign or verify was called after a previous
sign / verify without re-initializing.
OutputBufferTooSmall
out slice passed to sign is shorter than the algorithm’s
tag length.
WrongInitVariant
Wrong init variant for the selected algorithm
(e.g. init_with_nonce on HMAC, or init on GMAC).
VerificationFailed
verify failed: tag mismatch.
Trait Implementations§
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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