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§
type EncryptionErr
type EncryptionKey
Required Methods§
Sourcefn encrypt(
&self,
data: Vec<u8>,
key: Self::EncryptionKey,
) -> Result<Vec<u8>, Self::EncryptionErr>
fn encrypt( &self, data: Vec<u8>, key: Self::EncryptionKey, ) -> Result<Vec<u8>, Self::EncryptionErr>
Encrypt the plaintext.