pub trait KeyEncryptable<Key: CryptoKey, Output> {
// Required method
fn encrypt_with_key(self, key: &Key) -> Result<Output, CryptoError>;
}
Expand description
An encryption operation that takes the input value and encrypts it into the output value using a key reference. Implementing this requires a content type to be specified in the implementation.
Required Methods§
Sourcefn encrypt_with_key(self, key: &Key) -> Result<Output, CryptoError>
fn encrypt_with_key(self, key: &Key) -> Result<Output, CryptoError>
Encrypts a value using the provided key reference.