Skip to main content

EncryptionProvider

Trait EncryptionProvider 

Source
pub trait EncryptionProvider: Send + Sync {
    // Required methods
    fn encrypt(&self, plaintext: &str) -> Result<(String, String), String>;
    fn decrypt(
        &self,
        ciphertext_b64: &str,
        nonce_b64: &str,
    ) -> Result<String, String>;
    fn is_enabled(&self) -> bool;
}

Required Methods§

Source

fn encrypt(&self, plaintext: &str) -> Result<(String, String), String>

Source

fn decrypt( &self, ciphertext_b64: &str, nonce_b64: &str, ) -> Result<String, String>

Source

fn is_enabled(&self) -> bool

Implementors§