pub enum RcryptError {
CorruptedHash(String),
WrongSize(usize, usize),
UnsupportedHashPrefix(u8),
BadDecodedCost(String),
DisallowedCost(u32),
UnknownScheme(String),
Base64Error(DecodeError),
BadPassword,
RngError(Error),
BadSalt(usize),
}
Expand description
Errors that can result when hashing, salting, verifying, compressing
or decompressing rcrypt
hashes
Variants§
CorruptedHash(String)
The hash is corrupted. The description is given in the tuple field
WrongSize(usize, usize)
The hash has the wrong size (expected, present)
UnsupportedHashPrefix(u8)
The hash prefix is unsupported
BadDecodedCost(String)
The cost of the hash is incorrect
DisallowedCost(u32)
The cost is not allowed
UnknownScheme(String)
Unknown scheme
Base64Error(DecodeError)
An error while decoding base64 data
BadPassword
The password contains illegal characters or is empty
RngError(Error)
An error in the RNG call
BadSalt(usize)
The salt size is invalid
Trait Implementations§
Source§impl Debug for RcryptError
impl Debug for RcryptError
Source§impl Display for RcryptError
impl Display for RcryptError
Source§impl From<DecodeError> for RcryptError
impl From<DecodeError> for RcryptError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RcryptError
impl RefUnwindSafe for RcryptError
impl Send for RcryptError
impl Sync for RcryptError
impl Unpin for RcryptError
impl UnwindSafe for RcryptError
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