pub fn decrypt_with_iv_regular<'a>(
        self,
        key: &[u8],
        iv_vec: &[u8],
        ciphertext: &'a mut [u8],
    ) -> Result<()> {
        match self {
            SymmetricKeyAlgorithm::Plaintext => {}
            SymmetricKeyAlgorithm::IDEA => unimplemented!("IDEA encrypt"),
            SymmetricKeyAlgorithm::TripleDES => {
                decrypt_regular!(TdesEde3, key, iv_vec, ciphertext, self.block_size());
            }
            SymmetricKeyAlgorithm::CAST5 => decrypt_regular!(Cast5, key, iv_vec, ciphertext, bs),
            SymmetricKeyAlgorithm::Blowfish => {
                decrypt_regular!(Blowfish, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::AES128 => {
                decrypt_regular!(Aes128, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::AES192 => {
                decrypt_regular!(Aes192, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::AES256 => {
                decrypt_regular!(Aes256, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::Twofish => {
                decrypt_regular!(Twofish, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::Camellia128 => {
                unimplemented_err!("Camellia 128 not yet available")
            }
            SymmetricKeyAlgorithm::Camellia192 => {
                unimplemented_err!("Camellia 192 not yet available")
            }
            SymmetricKeyAlgorithm::Camellia256 => {
                unimplemented_err!("Camellia 256 not yet available")
            }
            SymmetricKeyAlgorithm::Private10 => {
                unimplemented_err!("Private10 should not be used, and only exist for compatability")
            }
        }

        Ok(())
    }
/// Decrypt the data using CFB mode, without padding. Overwrites the input.
/// This is regular CFB, not OpenPgP CFB.
Decrypt the data using CFB mode, without padding. Overwrites the input.
This is regular CFB, not OpenPgP CFB.
Decrypt the data using CFB mode without padding . Overwrites the input . This is regular CFB not OpenPgP CFB .
pub fn decrypt_with_iv_regular<'a>(
        self,
        key: &[u8],
        iv_vec: &[u8],
        ciphertext: &'a mut [u8],
    ) -> Result<()> {
        match self {
            SymmetricKeyAlgorithm::Plaintext => {}
            SymmetricKeyAlgorithm::IDEA => unimplemented!("IDEA encrypt"),
            SymmetricKeyAlgorithm::TripleDES => {
                decrypt_regular!(TdesEde3, key, iv_vec, ciphertext, self.block_size());
            }
            SymmetricKeyAlgorithm::CAST5 => decrypt_regular!(Cast5, key, iv_vec, ciphertext, bs),
            SymmetricKeyAlgorithm::Blowfish => {
                decrypt_regular!(Blowfish, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::AES128 => {
                decrypt_regular!(Aes128, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::AES192 => {
                decrypt_regular!(Aes192, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::AES256 => {
                decrypt_regular!(Aes256, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::Twofish => {
                decrypt_regular!(Twofish, key, iv_vec, ciphertext, self.block_size())
            }
            SymmetricKeyAlgorithm::Camellia128 => {
                unimplemented_err!("Camellia 128 not yet available")
            }
            SymmetricKeyAlgorithm::Camellia192 => {
                unimplemented_err!("Camellia 192 not yet available")
            }
            SymmetricKeyAlgorithm::Camellia256 => {
                unimplemented_err!("Camellia 256 not yet available")
            }
            SymmetricKeyAlgorithm::Private10 => {
                unimplemented_err!("Private10 should not be used, and only exist for compatability")
            }
        }
        Ok(())
    }
pub fn decrypt_with_iv_regular < ' a > ( self , key : & [ u8 ] , iv_vec : & [ u8 ] , ciphertext : & ' a mut [ u8 ] , ) -> Result < ( ) > { match self { SymmetricKeyAlgorithm :: Plaintext => { } SymmetricKeyAlgorithm :: IDEA => unimplemented ! ( " " ) , SymmetricKeyAlgorithm :: TripleDES => { decrypt_regular ! ( TdesEde3 key iv_vec ciphertext self block_size ( ) ) ; } SymmetricKeyAlgorithm :: CAST5 => decrypt_regular ! ( Cast5 key iv_vec ciphertext bs ) , SymmetricKeyAlgorithm :: Blowfish => { decrypt_regular ! ( Blowfish key iv_vec ciphertext self block_size ( ) ) } SymmetricKeyAlgorithm :: AES128 => { decrypt_regular ! ( Aes128 key iv_vec ciphertext self block_size ( ) ) } SymmetricKeyAlgorithm :: AES192 => { decrypt_regular ! ( Aes192 key iv_vec ciphertext self block_size ( ) ) } SymmetricKeyAlgorithm :: AES256 => { decrypt_regular ! ( Aes256 key iv_vec ciphertext self block_size ( ) ) } SymmetricKeyAlgorithm :: Twofish => { decrypt_regular ! ( Twofish key iv_vec ciphertext self block_size ( ) ) } SymmetricKeyAlgorithm :: Camellia128 => { unimplemented_err ! ( " " ) } SymmetricKeyAlgorithm :: Camellia192 => { unimplemented_err ! ( " " ) } SymmetricKeyAlgorithm :: Camellia256 => { unimplemented_err ! ( " " ) } SymmetricKeyAlgorithm :: Private10 => { unimplemented_err ! ( " " ) } } Ok ( ( ) ) }
Decrypt the data using CFB mode, without padding.
Decrypt the data using CFB mode without padding .
self
key
&[u8]
iv_vec
&[u8]
ciphertext
&'a mut [u8]
self
key
&[u8]
iv_vec
&[u8]
ciphertext
&'a mut [u8]