1use core::fmt;
2
3#[derive(Copy, Clone, Debug)]
5pub struct InvalidPrkLength;
6
7impl fmt::Display for InvalidPrkLength {
8 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
9 f.write_str("invalid pseudorandom key length, too short")
10 }
11}
12
13impl core::error::Error for InvalidPrkLength {}
14
15#[derive(Copy, Clone, Debug)]
17pub struct InvalidLength;
18
19impl fmt::Display for InvalidLength {
20 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
21 f.write_str("invalid number of blocks, too large output")
22 }
23}
24
25impl core::error::Error for InvalidLength {}