[][src]Trait tink_aead::subtle::IndCpaCipher

pub trait IndCpaCipher: IndCpaCipherBoxClone {
    pub fn encrypt(&self, plaintext: &[u8]) -> Result<Vec<u8>, TinkError>;
pub fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>, TinkError>; }

Required methods

pub fn encrypt(&self, plaintext: &[u8]) -> Result<Vec<u8>, TinkError>[src]

pub fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>, TinkError>[src]

Loading content...

Implementors

impl IndCpaCipher for AesCtr[src]

pub fn encrypt(&self, plaintext: &[u8]) -> Result<Vec<u8>, TinkError>[src]

Encrypt plaintext using AES in CTR mode. The resulting ciphertext consists of two parts: (1) the IV used for encryption and (2) the actual ciphertext.

pub fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>, TinkError>[src]

Decrypt ciphertext.

Loading content...