Trait Decryptable

Source
pub trait Decryptable<Ids: KeyIds, Key: KeyId, Output> {
    // Required method
    fn decrypt(
        &self,
        ctx: &mut KeyStoreContext<'_, Ids>,
        key: Key,
    ) -> Result<Output, CryptoError>;
}
Expand description

A decryption operation that takes the input value and decrypts it into the output value. Implementations should generally consist of calling Decryptable::decrypt for all the fields of the type.

Required Methods§

Source

fn decrypt( &self, ctx: &mut KeyStoreContext<'_, Ids>, key: Key, ) -> Result<Output, CryptoError>

Implementations on Foreign Types§

Source§

impl<Ids: KeyIds, Key: KeyId, T: Decryptable<Ids, Key, Output>, Output> Decryptable<Ids, Key, Option<Output>> for Option<T>

Source§

fn decrypt( &self, ctx: &mut KeyStoreContext<'_, Ids>, key: Key, ) -> Result<Option<Output>, CryptoError>

Source§

impl<Ids: KeyIds, Key: KeyId, T: Decryptable<Ids, Key, Output>, Output> Decryptable<Ids, Key, Vec<Output>> for Vec<T>

Source§

fn decrypt( &self, ctx: &mut KeyStoreContext<'_, Ids>, key: Key, ) -> Result<Vec<Output>, CryptoError>

Implementors§