pub enum CryptoError {
Show 20 variants
MemoryAllocationFailure = 1,
Internal = 2,
BufferStateIndeterminate = 3,
RngFailure = 4,
InsufficientSeedLength = 5,
RandomSamplingRetriesExceeded = 6,
RequestTooBig = 7,
NoKey = 8,
KeySize = 9,
KeyBinding = 10,
SignatureVerificationFailure = 11,
UnsupportedSecurityStrength = 12,
UnsupportedParams = 13,
UnspecifiedFailure = 14,
InvalidParams = 15,
InvalidIV = 16,
InvalidMessageLength = 17,
InvalidPadding = 18,
InvalidPoint = 19,
InvalidResult = 20,
}Expand description
Common error returned by cryptographic primitives.
Variants§
MemoryAllocationFailure = 1
Memory allocation failure.
Internal = 2
Internal logic error.
BufferStateIndeterminate = 3
A source or destination buffer was found in indeterminate state.
To be returned from operand IO slice iterators when encountering a buffer in indeterminate state. Indicates an internal logic error.
RngFailure = 4
Unspecified random number generator failure condition.
InsufficientSeedLength = 5
Attempt to seed a random number generator with a seed of insufficient length.
RandomSamplingRetriesExceeded = 6
Some probabilistic sampling algorithm exceeded the maximum number of retries.
RequestTooBig = 7
Request size is not supported.
NoKey = 8
Private key required for some operation is missing.
KeySize = 9
Key size is not supported by an algorithm.
KeyBinding = 10
Inconsistency between parts of a key.
This most commonly indicates a mismatch between the public and private parts of an asymmetric key pair, but could also get returned for impossible private keys not in the expected domain.
SignatureVerificationFailure = 11
Signature verification failure.
UnsupportedSecurityStrength = 12
Requested security strength is not supported.
UnsupportedParams = 13
Request parameters not supported.
UnspecifiedFailure = 14
Some unspecified failure.
InvalidParams = 15
Invalid parameters.
InvalidIV = 16
Invalid block cipher mode IV length.
InvalidMessageLength = 17
Invalid message length.
InvalidPadding = 18
Invalid padding in message.
InvalidPoint = 19
A point is not in the expected domain.
InvalidResult = 20
A computation resulted in an invalid result.
Implementations§
Source§impl CryptoError
impl CryptoError
pub fn anonymize_any_sensitive(self, anonymized_value: Self) -> Self
pub fn map(self, from_code: Self, to_code: Self) -> Self
Trait Implementations§
Source§impl Clone for CryptoError
impl Clone for CryptoError
Source§fn clone(&self) -> CryptoError
fn clone(&self) -> CryptoError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CryptoError
Source§impl Debug for CryptoError
impl Debug for CryptoError
impl Eq for CryptoError
Source§impl From<CryptoError> for RngGenerateError
impl From<CryptoError> for RngGenerateError
Source§fn from(value: CryptoError) -> Self
fn from(value: CryptoError) -> Self
Source§impl From<CryptoError> for RngReseedError
impl From<CryptoError> for RngReseedError
Source§fn from(value: CryptoError) -> Self
fn from(value: CryptoError) -> Self
Source§impl From<FixedVecMemoryAllocationFailure> for CryptoError
impl From<FixedVecMemoryAllocationFailure> for CryptoError
Source§fn from(_value: FixedVecMemoryAllocationFailure) -> Self
fn from(_value: FixedVecMemoryAllocationFailure) -> Self
Source§impl From<FixedVecNewFromFnError<CryptoError>> for CryptoError
impl From<FixedVecNewFromFnError<CryptoError>> for CryptoError
Source§fn from(value: FixedVecNewFromFnError<CryptoError>) -> Self
fn from(value: FixedVecNewFromFnError<CryptoError>) -> Self
Source§impl From<FixedVecNewFromFnError<Infallible>> for CryptoError
impl From<FixedVecNewFromFnError<Infallible>> for CryptoError
Source§fn from(value: FixedVecNewFromFnError<Infallible>) -> Self
fn from(value: FixedVecNewFromFnError<Infallible>) -> Self
Source§impl From<Infallible> for CryptoError
impl From<Infallible> for CryptoError
Source§fn from(value: Infallible) -> Self
fn from(value: Infallible) -> Self
Source§impl<BackendIteratorError> From<IoSlicesIterError<BackendIteratorError>> for CryptoErrorwhere
CryptoError: From<BackendIteratorError>,
impl<BackendIteratorError> From<IoSlicesIterError<BackendIteratorError>> for CryptoErrorwhere
CryptoError: From<BackendIteratorError>,
Source§fn from(value: IoSlicesIterError<BackendIteratorError>) -> Self
fn from(value: IoSlicesIterError<BackendIteratorError>) -> Self
Source§impl From<RngGenerateError> for CryptoError
impl From<RngGenerateError> for CryptoError
Source§fn from(value: RngGenerateError) -> Self
fn from(value: RngGenerateError) -> Self
Source§impl From<TryNewError> for CryptoError
impl From<TryNewError> for CryptoError
Source§fn from(value: TryNewError) -> Self
fn from(value: TryNewError) -> Self
Source§impl From<TryNewWithError<CryptoError>> for CryptoError
impl From<TryNewWithError<CryptoError>> for CryptoError
Source§fn from(value: TryNewWithError<CryptoError>) -> Self
fn from(value: TryNewWithError<CryptoError>) -> Self
Source§impl From<TryNewWithError<Infallible>> for CryptoError
impl From<TryNewWithError<Infallible>> for CryptoError
Source§fn from(value: TryNewWithError<Infallible>) -> Self
fn from(value: TryNewWithError<Infallible>) -> Self
Source§impl PartialEq for CryptoError
impl PartialEq for CryptoError
Source§fn eq(&self, other: &CryptoError) -> bool
fn eq(&self, other: &CryptoError) -> bool
self and other values to be equal, and is used by ==.