Function vaultist::encrypt_bytes

source ·
pub fn encrypt_bytes(
    key: &[u8],
    bytes: &[u8],
    nonce_bytes: Option<&[u8]>
) -> Vec<u8>
Expand description

Encrypt a byte array using a vault’s key.

Arguments

  • key - A vault’s key.

  • bytes - The bytes to encrypt.

  • nonce_bytes - The bytes of the nonce to use.