Crypto

Trait Crypto 

Source
pub trait Crypto {
    // Required methods
    fn new(key: SecretSlice<u8>) -> Self;
    fn encrypt(&self, data: &[u8], fingerprint: &[u8]) -> Result<Vec<u8>>;
    fn decrypt(&self, data: &[u8], fingerprint: &[u8]) -> Result<Vec<u8>>;
}

Required Methods§

Source

fn new(key: SecretSlice<u8>) -> Self

Source

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

Source

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

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§