Skip to main content

Crypter

Trait Crypter 

Source
pub trait Crypter: Send + Sync {
    // Required methods
    fn encrypt(&self, plaintext: &[u8]) -> Result<Vec<u8>, CryptoError>;
    fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>, CryptoError>;
}

Required Methods§

Source

fn encrypt(&self, plaintext: &[u8]) -> Result<Vec<u8>, CryptoError>

Source

fn decrypt(&self, ciphertext: &[u8]) -> Result<Vec<u8>, CryptoError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§