This repository has been archived on 2026-08-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
el-retired/engram/engrams/engram-crypto/src/error.rs
T
Will Anderson 909c1577f1 rename crates/ to engrams/, bindings/ to receptors/
- crates/ → engrams/ (Rust engrams live here)
- bindings/ → receptors/ (cross-language access points into the graph)
- Cargo.toml workspace paths updated
2026-04-29 03:27:33 -05:00

31 lines
747 B
Rust

use thiserror::Error;
#[derive(Debug, Error)]
pub enum CryptoError {
#[error("Encryption failed: {0}")]
EncryptionFailed(String),
#[error("Decryption failed: {0}")]
DecryptionFailed(String),
#[error("Signature verification failed")]
SignatureInvalid,
#[error("Unknown algorithm ID: {0}")]
UnknownAlgorithm(String),
#[error("Key derivation failed: {0}")]
KeyDerivation(String),
#[error("Invalid key length: expected {expected}, got {got}")]
InvalidKeyLength { expected: usize, got: usize },
#[error("Algorithm not available: {0}")]
AlgorithmUnavailable(String),
#[error("Serialization error: {0}")]
Serialization(String),
}
pub type CryptoResult<T> = Result<T, CryptoError>;