1

I need to use the PGP encryption. Need to create the public and private keys and encrypt the data of file with PGP encryption technique. How to do all these with PHP code?

I tried installing gnupg, but that isn't working. Then tried using OpenPGP library like example - How do you use the PHP OpenPGP library?

But these things didn't worked.

Tejasvita
  • 11
  • 3
  • 2
    Possible duplicate of [Encrypt files using PGP in PHP?](https://stackoverflow.com/questions/15969740/encrypt-files-using-pgp-in-php) – Peter Apr 16 '19 at 06:05
  • Generating PGP keys and encrypting under the public key in a single operation makes no sense. PGP is public key cryptography, so the public key is provided by the receiver of the cipher text. It sounds more like you are looking for some kind of symmetric encryption scheme, such as [ChaCha](https://www.php.net/manual/en/function.sodium-crypto-aead-chacha20poly1305-encrypt.php) or [AES](https://www.php.net/manual/en/function.sodium-crypto-aead-aes256gcm-encrypt.php). – Peter Apr 16 '19 at 06:12

0 Answers0