Trait IndCpaCipher
tink_aead::subtle
pub trait IndCpaCipher: IndCpaCipherBoxClone { fn encrypt(&self, plaintext: &[u8]) -> Result<Vec<u8>, TinkError>; fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>, TinkError>; }
fn encrypt(&self, plaintext: &[u8]) -> Result<Vec<u8>, TinkError>
fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>, TinkError>
impl IndCpaCipher for AesCtr
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.
Decrypt ciphertext.