Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

CtsEncrypt

Trait CtsEncrypt 

Source
pub trait CtsEncrypt: Sized {
    // Required method
    fn encrypt_inout(self, buf: InOutBuf<'_, '_, u8>) -> Result<(), Error>;

    // Provided methods
    fn encrypt(self, buf: &mut [u8]) -> Result<(), Error> { ... }
    fn encrypt_b2b(self, in_buf: &[u8], out_buf: &mut [u8]) -> Result<(), Error> { ... }
}
Expand description

Encryption functionality of CTS modes.

Required Methods§

Source

fn encrypt_inout(self, buf: InOutBuf<'_, '_, u8>) -> Result<(), Error>

Encrypt inout buffer.

§Errors

If encryption failed.

Provided Methods§

Source

fn encrypt(self, buf: &mut [u8]) -> Result<(), Error>

Encrypt data in-place.

§Errors

If encryption failed.

Source

fn encrypt_b2b(self, in_buf: &[u8], out_buf: &mut [u8]) -> Result<(), Error>

Encrypt data buffer-to-buffer.

§Errors

If encryption failed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<C> Encrypt for CbcCs1<C>

Source§

impl<C> Encrypt for CbcCs2<C>

Source§

impl<C> Encrypt for CbcCs3<C>

Source§

impl<C> Encrypt for EcbCs1<C>

Source§

impl<C> Encrypt for EcbCs2<C>

Source§

impl<C> Encrypt for EcbCs3<C>