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

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

Required methods

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

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

Loading content...

Implementors

impl IndCpaCipher for AesCtr[src]

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.

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

Decrypt ciphertext.

Loading content...