如何将变量值传递给 gpg 命令

发布于 2024-08-28 20:23:05 字数 329 浏览 1 评论 0原文

$importkey = system('gpg --import newkey.asc . $username');

需要将文件名作为变量传递。这样文件名及其内容就可以导入到 gnupg 密钥环中。

$gpg = system('gpg --recipient userid  --output filename --armor  --encrypt filename to encrypt', $retvalue);

我如何将收件人电子邮件 ID(用户 ID)和文件名作为变量传递给 gpg 命令

谢谢!

$importkey = system('gpg --import newkey.asc . $username');

need to pass the file name as a variable.so that file name with its contents can be import in gnupg keyring.

$gpg = system('gpg --recipient userid  --output filename --armor  --encrypt filename to encrypt', $retvalue);

how can i pass the recipient email id(userid) and the filename as variable to gpg commands

thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葬花如无物 2024-09-04 20:23:05

例如将 ' 更改为 ",然后您可以传入变量:

$importkey = system("gpg --import newkey.asc . $username");

Change the ' to " for example and then you can pass in variables:

$importkey = system("gpg --import newkey.asc . $username");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文