bitwarden_crypto

Trait KeyEncryptable

Source
pub trait KeyEncryptable<Key: CryptoKey, Output> {
    // Required method
    fn encrypt_with_key(self, key: &Key) -> Result<Output, CryptoError>;
}

Required Methods§

Source

fn encrypt_with_key(self, key: &Key) -> Result<Output, CryptoError>

Implementations on Foreign Types§

Source§

impl KeyEncryptable<PinKey, EncString> for &[u8]

Source§

impl KeyEncryptable<PinKey, EncString> for String

Source§

impl KeyEncryptable<SymmetricCryptoKey, EncString> for &str

Source§

impl KeyEncryptable<SymmetricCryptoKey, EncString> for &[u8]

Source§

impl KeyEncryptable<SymmetricCryptoKey, EncString> for String

Source§

impl<T: KeyEncryptable<Key, Output> + Send + Sync, Key: CryptoKey + Send + Sync, Output: Send + Sync> KeyEncryptable<Key, Vec<Output>> for Vec<T>

Source§

fn encrypt_with_key(self, key: &Key) -> Result<Vec<Output>, CryptoError>

Source§

impl<T: KeyEncryptable<Key, Output> + Send + Sync, Key: CryptoKey + Send + Sync, Output: Send + Sync, Id: Hash + Eq + Send + Sync> KeyEncryptable<Key, HashMap<Id, Output>> for HashMap<Id, T>

Source§

fn encrypt_with_key(self, key: &Key) -> Result<HashMap<Id, Output>, CryptoError>

Source§

impl<T: KeyEncryptable<Key, Output>, Key: CryptoKey, Output> KeyEncryptable<Key, Option<Output>> for Option<T>

Source§

impl<T: KeyEncryptable<Key, Output>, Key: CryptoKey, Output> KeyEncryptable<Key, Output> for Box<T>

Source§

fn encrypt_with_key(self, key: &Key) -> Result<Output, CryptoError>

Implementors§