1use thiserror::Error;
2
3#[derive(Error, Copy, Clone, Debug)]
5pub enum Error {
6 #[error("Invalid secret key length: {0}")]
8 InvalidSecretKeyLength(usize),
9 #[error("Invalid public key length: {0}")]
11 InvalidPublicKeyLength(usize),
12 #[error("Invalid ciphertext length: {0}")]
14 InvalidCiphertextLength(usize),
15 #[error("Invalid shared secret length: {0}")]
17 InvalidSharedSecretLength(usize),
18 #[error("Invalid message length: {0}")]
20 InvalidMessageLength(usize),
21 #[error("Unsupported algorithm")]
23 UnsupportedAlgorithm,
24}
25
26pub type FrodoResult<T> = Result<T, Error>;