Trait CipherEncrypt

Source
pub trait CipherEncrypt {
    type EncryptionErr;
    type EncryptionKey;

    // Required method
    fn encrypt(
        &self,
        data: Vec<u8>,
        key: Self::EncryptionKey,
    ) -> Result<Vec<u8>, Self::EncryptionErr>;
}
Expand description

The encryption half of a cipher.

Required Associated Types§

Required Methods§

Source

fn encrypt( &self, data: Vec<u8>, key: Self::EncryptionKey, ) -> Result<Vec<u8>, Self::EncryptionErr>

Encrypt the plaintext.

Implementors§