Trait EncryptionAlgorithmImpl

Source
pub trait EncryptionAlgorithmImpl<Digest> {
    // Required methods
    fn id(&self) -> Digest;
    fn encrypt(&self, key_id: [u8; 32], data: &[u8]) -> Vec<u8> ;
    fn decrypt(&self, key_id: [u8; 32], data: &[u8]) -> Vec<u8> ;
}

Required Methods§

Source

fn id(&self) -> Digest

Returns the EncryptionAlgorithmId that this implements.

Source

fn encrypt(&self, key_id: [u8; 32], data: &[u8]) -> Vec<u8>

Encrypts the data using the provided key.

Source

fn decrypt(&self, key_id: [u8; 32], data: &[u8]) -> Vec<u8>

Decrypts the data using the provided key.

Implementors§