pub enum CryptoError {
Config,
Random,
Malformed,
Unsupported,
BadSecret,
Required,
KeyExpired,
Replay,
}Expand description
Why a key, key material or payload operation failed.
Variants§
Config
The passphrase or key refresh settings are not valid.
Random
The system’s secure random source failed.
Malformed
The key material or payload is the wrong shape or size.
Unsupported
Well formed but outside the supported profile (for example AES-192, GCM, a nonzero KEKI, or a key size or salt that differs from the session’s).
BadSecret
The key material would not unwrap with this passphrase.
Required
Encryption was required but not supplied. This crate does not currently return it.
KeyExpired
No usable key: a key slot is empty, a key has run its period or cannot yet be replaced, or the next key was not confirmed in time.
Replay
A key refresh that repeats or contradicts the current keys, or a packet under a key that has already been replaced.
Trait Implementations§
Source§impl Clone for CryptoError
impl Clone for CryptoError
impl Copy for CryptoError
Source§impl Debug for CryptoError
impl Debug for CryptoError
Source§impl Display for CryptoError
impl Display for CryptoError
impl Eq 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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()