Expand description
Unified error type for cryptographic operations.
All fallible operations in this crate return Result<T>,
which is std::result::Result<T, CryptoError>.
§Error categories
| Variant | When it occurs |
|---|---|
CryptoError::InvalidKeyLength | Key bytes are wrong size for the algorithm |
CryptoError::InvalidKey | Key is malformed or fails validation |
CryptoError::InvalidNonceLength | Nonce bytes are wrong size |
CryptoError::AuthenticationFailed | Signature or AEAD tag verification failed |
CryptoError::Encryption | Encryption failed (rare — usually a bug) |
CryptoError::Decryption | Decryption failed (ciphertext tampered, wrong key, etc.) |
CryptoError::Kdf | Key derivation failed (bad params, Argon2 failure, etc.) |
CryptoError::Pqc | Post-quantum primitive failed |
CryptoError::ReedSolomon | Error correction encode/decode failed |
CryptoError::InvalidParameter | Invalid input parameter (empty seed, expired handle, etc.) |
CryptoError::Io | Underlying I/O error |
CryptoError::Serialization | Serialization or deserialization failed |
CryptoError::Compression | Compression or decompression failed |
Enums§
- Crypto
Error - Unified error type for cryptographic operations.
Type Aliases§
- Result
- Result alias for all fallible operations in this crate.