pub enum Error {
IOPatternViolation,
InvalidIOPattern,
TooFewInputElements,
EncryptionFailed,
DecryptionFailed,
}Expand description
Defines all possible error variants for the SAFE library.
Variants§
IOPatternViolation
This error occurs when the expected IO-pattern sequence wasn’t followed during the usage of the sponge algorithm.
InvalidIOPattern
This error occurs when the provided IO-pattern is not valid. This means that one of the following is not met:
- It doesn’t start with a call to squeeze
- It doesn’t end with a call to absorb
- Every call to absorb or squeeze has a length between 0 < len < 2^31
TooFewInputElements
This error occurs when the input elements provided to the
[Sponge::absorb] are less than the amount that should be absorbed.
EncryptionFailed
This error indicates a failure during the encryption process.
DecryptionFailed
This error indicates a failure during the decryption process.
Trait Implementations§
impl Copy 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 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