Trait engine::vault::Decrypt

source ·
pub trait Decrypt<T: TryFrom<Vec<u8>>>: AsRef<[u8]> {
    // Provided method
    fn decrypt<P: BoxProvider, AD: AsRef<[u8]>>(
        &self,
        key: &Key<P>,
        ad: AD
    ) -> Result<T, DecryptError<P::Error>> { ... }
}
Expand description

Trait for decryptable data. Allows the data to be decrypted.

Provided Methods§

source

fn decrypt<P: BoxProvider, AD: AsRef<[u8]>>( &self, key: &Key<P>, ad: AD ) -> Result<T, DecryptError<P::Error>>

decrypts raw data and creates a new type T from the plaintext

Object Safety§

This trait is not object safe.

Implementors§