encrypt_data

Function encrypt_data 

Source
pub fn encrypt_data(
    data_key: &[u8; 32],
    plaintext: &[u8],
    nonce: &[u8; 12],
) -> Result<Vec<u8>>
Expand description

Encrypt data with a data key (for config/mutable sections).

§Arguments

  • data_key - 32-byte data key
  • plaintext - Data to encrypt
  • nonce - 12-byte nonce

§Returns

Ciphertext with appended tag