Trait dco3_crypto::Encrypt
source · pub trait Encrypt {
// Required method
fn encrypt(
data: impl AsRef<[u8]>
) -> Result<EncryptionResult, DracoonCryptoError>;
}
Expand description
Trait representing necessary functions for symmetric encryption
- encrypt on the fly
- return an encrypter for chunked encryption
Required Methods§
fn encrypt( data: impl AsRef<[u8]> ) -> Result<EncryptionResult, DracoonCryptoError>
Object Safety§
This trait is not object safe.
Implementors§
impl Encrypt for DracoonCrypto
Implements encryption based on AES256 GCM. Provides function to encrypt on the fly and another one to create a Crypter in order to encrypt in chunks.