pub trait PrimitiveEncryptable<Ids: KeyIds, Key: KeyId, Output> {
// Required method
fn encrypt(
&self,
ctx: &mut KeyStoreContext<'_, Ids>,
key: Key,
) -> Result<Output, CryptoError>;
}
Expand description
An encryption operation that takes the input value - a primitive such as String
and encrypts
it into the output value. The implementation decides the content format.
Required Methods§
Sourcefn encrypt(
&self,
ctx: &mut KeyStoreContext<'_, Ids>,
key: Key,
) -> Result<Output, CryptoError>
fn encrypt( &self, ctx: &mut KeyStoreContext<'_, Ids>, key: Key, ) -> Result<Output, CryptoError>
Encrypts a primitive without requiring an externally provided content type