#[non_exhaustive]pub enum Error {
Show 15 variants
UnsupportedVersion(u8),
UnsupportedSuite(u8),
LegacyV1Artifact,
InvalidKey,
InvalidEnvelope,
InvalidSignature,
DecryptionFailed,
VerificationFailed,
MessageTooLarge {
len: usize,
max: usize,
},
ContextTooLong,
RandomnessUnavailable,
NoRecipients,
TooManyRecipients {
count: usize,
max: usize,
},
StreamFinished,
StreamTruncated,
}Expand description
Errors that can occur during cryptographic operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedVersion(u8)
The wire object declares a format version this crate does not support.
UnsupportedSuite(u8)
The wire object declares a cipher suite this crate does not support.
LegacyV1Artifact
The input is a quantum-shield 0.1.x JSON artifact. The v1 format is cryptographically broken and unsupported by design.
InvalidKey
Key material failed to parse or validate.
InvalidEnvelope
An envelope failed to parse (wrong magic, truncated, or malformed).
InvalidSignature
A signature failed to parse (wrong magic, truncated, or malformed).
DecryptionFailed
Decryption failed. No further detail is provided by design.
VerificationFailed
Signature verification failed. No further detail is provided by design.
MessageTooLarge
The plaintext exceeds MAX_PLAINTEXT_LEN.
ContextTooLong
The signing context exceeds MAX_CONTEXT_LEN.
The operating system’s secure random number generator failed.
NoRecipients
A multi-recipient envelope was requested with no recipients.
TooManyRecipients
A multi-recipient envelope exceeds MAX_RECIPIENTS.
StreamFinished
A streaming chunk was submitted after the final chunk.
StreamTruncated
A stream ended without a final chunk (possible truncation).
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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()