pub enum CryptoError {
PasswordHash(String),
PasswordHashPolicy(String),
PasswordHashVerificationLimit {
parameter: &'static str,
actual: u64,
maximum: u64,
},
MessageAuthentication(String),
InvalidSecretEnvelopePolicy,
InvalidSecretEnvelope,
UnsupportedSecretEnvelopeVersion,
SecretEnvelopeKeyDerivation,
SecretEnvelopeEncryption,
SecretEnvelopeAuthentication,
}Expand description
Errors produced by cryptographic helper functions.
Variants§
PasswordHash(String)
Password hashing, parsing, or verification failed.
PasswordHashPolicy(String)
A password-hash policy is internally inconsistent or unsupported.
PasswordHashVerificationLimit
A stored password hash exceeds the configured verification resource budget.
Fields
MessageAuthentication(String)
Keyed message authentication initialization failed.
InvalidSecretEnvelopePolicy
The caller supplied an invalid product-owned secret-envelope context or policy value.
InvalidSecretEnvelope
The stored secret envelope is malformed.
UnsupportedSecretEnvelopeVersion
The stored secret envelope uses an unsupported version.
SecretEnvelopeKeyDerivation
The encryption key could not be derived for the supplied context.
SecretEnvelopeEncryption
Authenticated encryption failed.
SecretEnvelopeAuthentication
Authentication or decryption failed.
Implementations§
Source§impl CryptoError
impl CryptoError
Sourcepub fn password_hash(error: impl Display) -> Self
pub fn password_hash(error: impl Display) -> Self
Creates a password-hash error from any displayable error value.
Sourcepub fn password_hash_policy(error: impl Display) -> Self
pub fn password_hash_policy(error: impl Display) -> Self
Creates a password-hash policy error.
Sourcepub fn message_authentication(error: impl Display) -> Self
pub fn message_authentication(error: impl Display) -> Self
Creates a keyed message-authentication error.
Trait Implementations§
Source§impl Debug for CryptoError
impl Debug for CryptoError
Source§impl Display for CryptoError
impl Display for CryptoError
Source§impl Error for CryptoError
impl Error for CryptoError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CryptoError
impl RefUnwindSafe for CryptoError
impl Send for CryptoError
impl Sync for CryptoError
impl Unpin for CryptoError
impl UnwindSafe for CryptoError
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