0
$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 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.