changing encrypt_file to encrypt, with fn as output