pub enum CryptoError {
InvalidKey,
InvalidNonce,
InvalidTag,
BufferTooSmall,
BadInput,
Internal(&'static str),
Kex,
Sign,
Rng,
Encoding,
UnsupportedAlgorithm,
}Expand description
Unified error type for all OxiCrypto operations.
Variants§
InvalidKey
Supplied key has wrong length or is otherwise invalid.
InvalidNonce
Supplied nonce/IV has wrong length or is otherwise invalid.
InvalidTag
Authentication tag verification failed (AEAD open / MAC verify).
BufferTooSmall
Output buffer is too small for the requested operation.
BadInput
General bad-input condition (e.g. zero-length KDF output requested).
Internal(&'static str)
An internal or backend error with a static message.
Kex
Key-exchange or encapsulation/decapsulation failure (e.g. ML-KEM).
Sign
Signature generation or verification failure (e.g. ML-DSA).
Rng
RNG-specific failure (e.g. getrandom unavailable).
Encoding
Encoding / decoding failure (DER, PEM, SEC1, etc.).
UnsupportedAlgorithm
Requested algorithm is not compiled-in or not supported at runtime.
Trait Implementations§
Source§impl Clone for CryptoError
impl Clone for CryptoError
Source§fn clone(&self) -> CryptoError
fn clone(&self) -> CryptoError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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()
Source§impl PartialEq for CryptoError
impl PartialEq for CryptoError
Source§fn eq(&self, other: &CryptoError) -> bool
fn eq(&self, other: &CryptoError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CryptoError
impl StructuralPartialEq for CryptoError
Auto Trait Implementations§
impl Freeze for CryptoError
impl RefUnwindSafe for CryptoError
impl Send for CryptoError
impl Sync for CryptoError
impl Unpin for CryptoError
impl UnsafeUnpin 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