Function decrypt_file

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

Decrypts an AES-256 encrypted file.

§Arguments

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

§Panics

This function will panic if:

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