******************************************************************************** * CURRENT VERSION: 1.1 - Adjusted how the automatic detection of the * GPG binary works (now a method, rather than a property) * * USAGE: * * $yourVar = new gpg(); * * -------------------------- * PROPERTY DECLARATIONS * -------------------------- * $yourVar->keyring // this var holds the location of your GPG keyring. * // *keyring should ONLY hold public PGP/GPG keys * $yourVar->keys[] // can be single var or array; holds pgp/gpg key(s) * $yourVar->data // holds the block of data to be encrypted * * -------------------------- * METHOD DECLARATIONS * -------------------------- * $yourVar->autolocate_gpg(); // try to automatically locate the GPG binary * $encrypted = $yourVar->gpgit(); // returns the encrypted block of data ********************************************************************************
PHP CLASS FILES
- [ view source ] [ download ] PHP class (class.gpg.php) using proc_open()
- [ view source ] [ download ] PHP class (class.gpg.php) using popen()
USE THESE SCRIPTS AT YOUR OWN RISK! I make no promises about the security of this script, nor do I guarantee it will work on any platform (or with any given version of GPG). While I have tried to ensure reasonable precautions to make these scripts as stable and secure as I can - you have been warned!
These scripts are open-source and free (no cost). You may do with it what you wish, as long as you leave the copyright data at the top in place.

He who dies with the most toys, still dies.