Genral Web Comments
Sunday, November 14, 2004
Business-PHP.com :: gpg_encrypt() v1.2
Business-PHP.com :: gpg_encrypt() v1.2: "gpg_encrypt() is a PHP function that will allow you to easily use GnuPG to encrypt data to your public PGP key and mail that encrypted data to yourself, where it can be securely decrypted with your private key. This is designed primarily for use with web-based forms but can be used to encrypt any data.
Requires PHP >=4.3.0
Typical usage:
$gpg = gpg_encrypt($secret_message, /usr/local/bin/gpg, /home/www/.gnupg, 0x123456)
The 4 required arguments are:
1. $secret_message The data to be encrypted
2. /path/to/gpg The full path to your gpg program
3. /path/to/.gnupg The full path to the GnuPG home directory (keyring)
4. 0x123456 Key ID to encrypt the message to"
