rc5_rs/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum Error {
5 #[error("Invalid key size")]
6 InvalidKeySize,
7
8 #[error("Invalid word size")]
9 InvalidWordSize,
10
11 #[error("Invalid bytes. Can't convert to a word.")]
12 InvalidBytes,
13
14 #[error(
15 "Invalid plaintext or cyphertext length. Must be a multiple of the block \
16 size"
17 )]
18 InvalidInputLength,
19
20 #[error("Invalid number of rounds")]
21 InvalidRoundsCount,
22}