pub enum Error {
Show 18 variants
KeyGeneration(String),
Encapsulation(String),
Decapsulation(String),
Signing(String),
SignatureVerificationFailed,
Encryption(String),
Decryption(String),
InvalidKeySize {
expected: usize,
actual: usize,
},
InvalidCiphertext(String),
InvalidSignature(String),
InvalidNonce {
expected: usize,
actual: usize,
},
HexDecode(FromHexError),
Base64Decode(DecodeError),
Json(Error),
KeyStorage(String),
KeyNotFound(String),
TimestampExpired,
InvalidSecurityLevel(String),
}Expand description
Errors that can occur in qux-pqc operations
Variants§
KeyGeneration(String)
Key generation failed
Encapsulation(String)
Encapsulation failed
Decapsulation(String)
Decapsulation failed
Signing(String)
Signing failed
SignatureVerificationFailed
Signature verification failed
Encryption(String)
Encryption failed
Decryption(String)
Decryption failed
InvalidKeySize
Invalid key size
InvalidCiphertext(String)
Invalid ciphertext
InvalidSignature(String)
Invalid signature
InvalidNonce
Invalid nonce
HexDecode(FromHexError)
Hex decoding error
Base64Decode(DecodeError)
Base64 decoding error
Json(Error)
JSON serialization/deserialization error
KeyStorage(String)
Key storage error
KeyNotFound(String)
Key not found
TimestampExpired
Timestamp expired
InvalidSecurityLevel(String)
Invalid security level
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<FromHexError> for Error
impl From<FromHexError> for Error
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
Converts to this type from the input type.
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