INNER CODE UNIT · Rust
from
matrix-org/vodozemac · src/cipher/mod.rs:80
fn from(m: Mac) -> Self {
Self::Full(m)
}
}
impl From<[u8; Mac::TRUNCATED_LEN]> for MessageMac {
fn from(m: [u8; Mac::TRUNCATED_LEN]) -> Self {
Self::Truncated(m)
}
}
#[derive(Debug, Error)]
pub enum DecryptionError {
#[error("Failed decrypting, invalid padding")]
InvalidPadding(#[from] UnpadError),
#[error("The MAC of the ciphertext didn't pass validation {0}")]
Mac(#[from] MacError),
#[error("The ciphertext didn't contain a valid MAC")]