Skip to main content

CredentialCryptoProvider

Trait CredentialCryptoProvider 

Source
pub trait CredentialCryptoProvider {
    // Required methods
    fn new(key: String) -> CredentialCrypto;
    fn generate_salt(&self) -> Result<String, Error>;
    fn encrypt(&self, salt: &str, plaintext: &str) -> Result<String, Error>;
    fn decrypt(&self, salt: &str, password: &str) -> Result<String, Error>;
}

Required Methods§

Source

fn new(key: String) -> CredentialCrypto

Source

fn generate_salt(&self) -> Result<String, Error>

Source

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

Source

fn decrypt(&self, salt: &str, password: &str) -> Result<String, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§