ncryptf/error.rs
1use thiserror::Error;
2
3/// Errors that ncryptf may encounter during encrypting and decrypting data - generalized.
4#[derive(Error, Debug)]
5pub enum NcryptfError {
6 #[error("the argument provided `{0}` was did not match the expected type")]
7 InvalidArgument(String),
8 #[error("the argument provided `{0}` was did not match the expected type")]
9 TokenSignatureSize(String),
10 #[error("signature could not be generated")]
11 SignatureGenerationError,
12 #[error("message could not be encrypted")]
13 EncryptError,
14 #[error("message could not be decrypted")]
15 DecryptError,
16}