INNER CODE UNIT · Rust

from

matrix-org/vodozemac · src/cipher/mod.rs:86

    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")]
    MacMissing,
}

/// A cipher used for encrypting and decrypting messages.
#[allow(unreachable_pub)]
pub struct Cipher {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…