[][src]Trait tink_core::Aead

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

Aead is the interface for authenticated encryption with additional authenticated data.

Implementations of this trait are secure against adaptive chosen ciphertext attacks. Encryption with additional data ensures authenticity and integrity of that data, but not its secrecy (see RFC 5116).

Required methods

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

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

Loading content...

Implementors

Loading content...