Encrypt Data using Public Key

ぃ、小莉子 提交于 2019-12-12 02:25:04

问题


$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?


回答1:


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.



来源:https://stackoverflow.com/questions/2460941/encrypt-data-using-public-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!