pub enum Tr31Error {
UnsupportedVersion(String),
TotalBlockLengthNotMultiple {
block_length: usize,
actual: usize,
},
KeyBlockLengthMismatch {
expected: usize,
actual: usize,
},
KeyBlockBelowMinimum {
minimum: usize,
actual: usize,
},
InvalidMacLength {
expected: usize,
actual: usize,
},
MacVerificationFailed,
Header(KeyBlockHeaderError),
Payload(PayloadError),
Hex(FromHexError),
KeyBlockLengthTooLarge {
maximum: usize,
actual: usize,
},
}Expand description
Errors produced by TR-31 key block processing.
Variants§
UnsupportedVersion(String)
The requested key block version is not supported by this implementation.
TotalBlockLengthNotMultiple
The complete key block length is not aligned to the cipher block size.
KeyBlockLengthMismatch
The actual key block length differs from the value encoded in the header.
KeyBlockBelowMinimum
The key block is shorter than the minimum valid version D block.
InvalidMacLength
The decoded MAC does not have the required length.
MacVerificationFailed
Key block authentication failed.
Header(KeyBlockHeaderError)
Header processing failed.
Payload(PayloadError)
Payload processing failed.
Hex(FromHexError)
Hexadecimal decoding failed.
KeyBlockLengthTooLarge
Trait Implementations§
Source§impl Error for Tr31Error
impl Error for Tr31Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<FromHexError> for Tr31Error
impl From<FromHexError> for Tr31Error
Source§fn from(error: FromHexError) -> Self
fn from(error: FromHexError) -> Self
Converts to this type from the input type.
Source§impl From<KeyBlockHeaderError> for Tr31Error
impl From<KeyBlockHeaderError> for Tr31Error
Source§fn from(error: KeyBlockHeaderError) -> Self
fn from(error: KeyBlockHeaderError) -> Self
Converts to this type from the input type.
Source§impl From<PayloadError> for Tr31Error
impl From<PayloadError> for Tr31Error
Source§fn from(error: PayloadError) -> Self
fn from(error: PayloadError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Tr31Error
impl RefUnwindSafe for Tr31Error
impl Send for Tr31Error
impl Sync for Tr31Error
impl Unpin for Tr31Error
impl UnsafeUnpin for Tr31Error
impl UnwindSafe for Tr31Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more