Cipher

Trait Cipher 

Source
pub trait Cipher {
    type EncryptOptions;
    type DecryptOptions;

    // Required methods
    fn encrypt(
        data: &mut [u8],
        key: &[u8],
        options: &Self::EncryptOptions,
    ) -> Result<(), Error>;
    fn decrypt(
        data: &mut [u8],
        key: &[u8],
        options: &Self::DecryptOptions,
    ) -> Result<(), Error>;
}

Required Associated Types§

Required Methods§

Source

fn encrypt( data: &mut [u8], key: &[u8], options: &Self::EncryptOptions, ) -> Result<(), Error>

Source

fn decrypt( data: &mut [u8], key: &[u8], options: &Self::DecryptOptions, ) -> Result<(), Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§