Function encrypt_file

Source
pub fn encrypt_file(file_path: &str, key: &[u8])
Expand description

Encrypts a file using AES-256 encryption.

§Arguments

  • file_path - Path of the file to encrypt.
  • key - The encryption key. (32 bytes)

§Panics

This function will panic if:

  • The file cannot be read.
  • The output file cannot be created.
  • The encrypted data cannot be written to the output file.