DecryptData

Trait DecryptData 

Source
pub trait DecryptData: Entity {
    // Required method
    fn decrypt_data(
        cipher: &Aes256Gcm,
        primary_key: &<Self as Entity>::PrimaryKey,
        data: &[u8],
    ) -> CryptoKeystoreResult<Vec<u8>>;
}
Expand description

This trait is intended to provide a convenient way to decrypt data.

There is a blanket implementation covering all Entitys.

Required Methods§

Source

fn decrypt_data( cipher: &Aes256Gcm, primary_key: &<Self as Entity>::PrimaryKey, data: &[u8], ) -> CryptoKeystoreResult<Vec<u8>>

Decrypt some data, symmetrically to the process encrypt_data uses.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§