Creates encrypt_file method.