This module allows you to interact with gnupg.
This extension is EXPERIMENTAL. The behaviour of this extension -- including the names of its functions and anything else documented about this extension -- may change without notice in a future release of PHP. Use this extension at your own risk.
The gnupg extension requires PHP 4.3. To use this extension in an OO style, PHP 5 is required.
This extension requires the gpgme library
This extension makes use of the keyring of the current user. This keyring is normally located in ~./.gnupg/. To specify a custom location, store the path to the keyring in the environment variable GNUPGHOME. See putenv for more information how to do this.
Some functions require the specification of a key. This specification can be anything that refers to an unique key (userid, key-id, fingerprint, ...). This documentation uses the fingerprint in all examples.
This extension also comes with an Iterator for your keyring.
This example will clearsign a given text.
Example 1. gnupg clearsign example (procedural)
Example 2. gnupg clearsign example (OO)