Skip to main content

EncryptionProvider

Trait EncryptionProvider 

Source
pub trait EncryptionProvider: Send + Sync {
    // Required methods
    fn encrypt(&self, plaintext: &[u8], password: &str) -> Result<EncryptedData>;
    fn decrypt(
        &self,
        encrypted: &EncryptedData,
        password: &str,
    ) -> Result<Vec<u8>>;
    fn algorithm(&self) -> &str;
}

Required Methods§

Source

fn encrypt(&self, plaintext: &[u8], password: &str) -> Result<EncryptedData>

Source

fn decrypt(&self, encrypted: &EncryptedData, password: &str) -> Result<Vec<u8>>

Source

fn algorithm(&self) -> &str

Implementors§