从命令行使用gpg创建pgp文件 [英] Create pgp file with gpg from command line

查看:74
本文介绍了从命令行使用gpg创建pgp文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想加密一个xml文件,并且正在使用gpg4win(kleopatra).使用kleopatra界面,我设置了一个选项来生成扩展名为pgp的文件,而不是默认扩展名为gpg的文件.

I want to encrypt an xml file and I am using gpg4win (kleopatra). Using the kleopatra interface I set an option to produce files with extension pgp instead of gpg which is the default extension.

我正在尝试使用命令

gpg -r test@test.gr -se C:\temp\myfile.xml

因为我需要在仅接受pgp的Web应用程序中提交它.我试图在命令中放置一些其他选项,但是我总是得到一个gpg文件.如何从命令行生成pgp文件?

because I need to submit it in a web app that accepts pgp only. I have tried to put some other options in the command but I always get a gpg file. How can I produce a pgp file from command line?

推荐答案

此过程可能与其他过程不同,但这对我有用:

This may not be the same process as others, but this worked for me:

gpg --batch --yes --recipient "user" --output "fulldirectory\filename.txt.pgp" --encrypt "fulldirectory\filename.txt"

这篇关于从命令行使用gpg创建pgp文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆