Trait ockam_vault_core::SymmetricVault[][src]

pub trait SymmetricVault: Zeroize {
    fn aead_aes_gcm_encrypt(
        &mut self,
        context: &Secret,
        plaintext: &[u8],
        nonce: &[u8],
        aad: &[u8]
    ) -> Result<Buffer<u8>>;
fn aead_aes_gcm_decrypt(
        &mut self,
        context: &Secret,
        cipher_text: &[u8],
        nonce: &[u8],
        aad: &[u8]
    ) -> Result<Buffer<u8>>; }
Expand description

Trait with symmetric encryption

Required methods

fn aead_aes_gcm_encrypt(
    &mut self,
    context: &Secret,
    plaintext: &[u8],
    nonce: &[u8],
    aad: &[u8]
) -> Result<Buffer<u8>>
[src]

Encrypt a payload using AES-GCM

fn aead_aes_gcm_decrypt(
    &mut self,
    context: &Secret,
    cipher_text: &[u8],
    nonce: &[u8],
    aad: &[u8]
) -> Result<Buffer<u8>>
[src]

Decrypt a payload using AES-GCM

Implementors