使用公钥加密数据

发布于 2024-08-26 05:28:11 字数 239 浏览 6 评论 0原文

$key = file_get_contents('http://keyserver.pramberger.at/pks/lookup?op=get&search=uid');

'$key' 变量中获取公钥后,我需要使用此公钥加密数据。 键必须以 ----Begin pgp block ---to end pgp block---- 开头。 如何在 php 中完成此操作?

$key = file_get_contents('http://keyserver.pramberger.at/pks/lookup?op=get&search=uid');

after getting public key in '$key' variable i need to encrypt the data using this public key.
the key must be start with ----Begin pgp block ---to end pgp block----.
How this can be done in php?

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

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

发布评论

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

评论(1

变身佩奇 2024-09-02 05:28:11

也许这篇关于使用 PHP 和 GnuPG 进行加密和解密的文章(通过 Google 找到)对您有帮助。

还有一个 PHP 模块 与 GnuPG 交互。

嗯,GPG 与 PGP 兼容。

Maybe this article about Encryption and Decryption using PHP and GnuPG (found via Google) helps you.

And there is also a PHP module to interact with GnuPG.

Afaik, GPG is compatible with PGP.

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