pub enum CryptoError {
Show 14 variants
UnknownAlgorithm(String),
InvalidHashFormat(String),
InvalidSignatureFormat(String),
SignatureVerificationFailed,
InvalidPublicKey(String),
InvalidSecretKey(String),
MissingSecretKey,
Base64DecodeError(String),
InvalidDataLength {
expected: usize,
actual: usize,
},
SerializationError(String),
HashError(String),
SigningError(String),
UnsupportedAlgorithm(String),
InvalidDerFormat(String),
}Expand description
Errors returned by hashing, key handling and signature operations.
Variants§
UnknownAlgorithm(String)
The identifier prefix does not match any supported algorithm.
InvalidHashFormat(String)
A digest cannot be parsed or does not match the expected layout.
InvalidSignatureFormat(String)
A signature cannot be parsed or does not match the expected layout.
SignatureVerificationFailed
Signature verification failed.
InvalidPublicKey(String)
A public key is malformed or has an unexpected size.
InvalidSecretKey(String)
A secret key is malformed, missing data or cannot be decrypted.
MissingSecretKey
Signing was requested from a verification-only value.
Base64DecodeError(String)
Base64 decoding failed.
InvalidDataLength
The input size does not match the size required by the algorithm.
SerializationError(String)
Borsh serialization or deserialization failed.
HashError(String)
Hash computation or hash comparison failed.
SigningError(String)
A signing operation could not be completed.
UnsupportedAlgorithm(String)
The algorithm is recognized but not implemented by this crate.
InvalidDerFormat(String)
PKCS#8 DER parsing failed.
Trait Implementations§
Source§impl Clone for CryptoError
impl Clone for CryptoError
Source§fn clone(&self) -> CryptoError
fn clone(&self) -> CryptoError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more