[][src]Trait secret_keeper::ciphers::CompressingCipher

pub trait CompressingCipher: Cipher {
#[must_use]    fn seal_compressed<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        src: &'life1 [u8],
        aad: Option<&'life2 [u8]>
    ) -> Pin<Box<dyn Future<Output = Result<(Bytes, AuthTag), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn open_compressed<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        src: &'life1 mut [u8],
        tag: &'life2 [u8],
        size_hint: Option<u64>,
        aad: Option<&'life3 [u8]>
    ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
; }

Compressing cipher that compresses data before encrypting.

Required methods

#[must_use]fn seal_compressed<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    src: &'life1 [u8],
    aad: Option<&'life2 [u8]>
) -> Pin<Box<dyn Future<Output = Result<(Bytes, AuthTag), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

Compress and encrypt the slice, with optional associated data.

#[must_use]fn open_compressed<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    src: &'life1 mut [u8],
    tag: &'life2 [u8],
    size_hint: Option<u64>,
    aad: Option<&'life3 [u8]>
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 

Decrypt slice into the provided buffer. src: compressed ciphertext tag: auth tag size_hint: optional size used to allocate buffer for result

Loading content...

Implementors

impl CompressingCipher for XChaCha20Compress[src]

fn seal_compressed<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    src: &'life1 [u8],
    _aad: Option<&'life2 [u8]>
) -> Pin<Box<dyn Future<Output = Result<(Bytes, AuthTag), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Compress and encrypt the slice, with optional associated data.

fn open_compressed<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    src: &'life1 mut [u8],
    tag: &'life2 [u8],
    size_hint: Option<u64>,
    _aad: Option<&'life3 [u8]>
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Decrypt slice into the provided buffer. src: compressed ciphertext tag: auth tag size_hint: optional size used to allocate buffer for result

Loading content...