#[non_exhaustive]
pub enum Error {
Show 19 variants
InvalidPaddingScheme,
Decryption,
Verification,
MessageTooLong,
InputNotHashed,
NprimesTooSmall,
TooFewPrimes,
InvalidPrime,
InvalidModulus,
InvalidExponent,
InvalidCoefficient,
ModulusTooLarge,
PublicExponentTooSmall,
PublicExponentTooLarge,
Pkcs1(Error),
Pkcs8(Error),
Internal,
LabelTooLong,
InvalidPadLen,
}
Expand description
Error types
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidPaddingScheme
Invalid padding scheme.
Decryption
Decryption error.
Verification
Verification error.
MessageTooLong
Message too long.
InputNotHashed
Input must be hashed.
NprimesTooSmall
Number of primes must be 2 or greater.
TooFewPrimes
Too few primes of a given length to generate an RSA key.
InvalidPrime
Invalid prime value.
InvalidModulus
Invalid modulus.
InvalidExponent
Invalid exponent.
InvalidCoefficient
Invalid coefficient.
ModulusTooLarge
Modulus too large.
PublicExponentTooSmall
Public exponent too small.
PublicExponentTooLarge
Public exponent too large.
Pkcs1(Error)
PKCS#1 error.
Pkcs8(Error)
PKCS#8 error.
Internal
Internal error.
LabelTooLong
Label too long.
InvalidPadLen
Invalid padding length.
Trait Implementations§
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)>
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()