Skip to main content

encrypt_data_ref

Function encrypt_data_ref 

Source
pub fn encrypt_data_ref(
    argon2: Argon2,
    data: &[u8],
    credentials: Credentials,
) -> Result<Vec<u8>, Error>
Expand description

Encrypts the given data

This is the same as encrypt_data but takes a reference to the data to encrypt

Use this if the data you want to encrypt is too large to fit in a SecureBytes

ยงArguments

  • argon2 - The Argon2 instance to use for the password hashing
  • data - a reference to the data to encrypt
  • credentials - The credentials to use for encryption