如何更改 GPG 的密码/密码提示文本
在 GPG 中,当我们进行加密时
gpg --cipher-algo AES256 --symmetric ./.abcd.csv
,它会打开一个提示
输入密码
我们也可以更改它
输入 xyz 的密码:
< img src="https://i.sstatic.net/94Jlx.jpg" alt="在此处输入图像描述">
in GPG while we are doing encryption
gpg --cipher-algo AES256 --symmetric ./.abcd.csv
It open a prompt
Enter Passphrase
Can we change that too
Enter Passphrase for xyz:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
gpg
PIN 输入由外部程序或设备处理,因此没有通用方法来控制 PIN 的提示,除非您强制gpg
进入批处理模式,并且强制 PIN 输入循环回调用者脚本,以便您可以完全控制它。请注意,这存在安全问题,因为在控制 PIN 条目的同时,您还要对所有安全性负责,而 shell 脚本是处理 PIN 等秘密数据的最不安全的环境。
以下是控制 PIN 提示的方法。
(使用此功能之前请了解安全问题):
The
gpg
PIN entry is handled by an external program or device, so there is no universal mean to control the prompt of a PIN, unless you forcegpg
into batch mode, and force PIN entry to loop back to the caller script, so you have full control of it.Note that this is of questionable security, because while taking control of the pin entry, you are also responsible for all the security, and a shell script is the least secure environment to handle secret data like a PIN.
Here it is how you would control the PIN prompt.
(Know the security concerns before using this):