Added function to encrypt and decrypt a file