bitwarden_crypto::keys::key_encryptable

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§