friendica-addons/securemail/vendor/singpolyma/openpgp-php/examples/README.md
Hypolite Petovan 0c7fd9a34d [securemail] Upgrade Composer dependencies to fix PHP8 issue
- Upgrading phpseclib/phpseclib (2.0.4 => 2.0.34)
- Upgrading singpolyma/openpgp-php (0.3.0 => 0.5.0)
2021-11-16 15:37:37 -05:00

782 B

OpenPGP.php Examples

The scripts in this folder show how to use this library to perform various tasks such as generating a new key, signing a message, and verifying a message that has been signed.

To use these examples, make sure phpseclib is available. You can install it using Composer:

git clone https://github.com/singpolyma/openpgp-php.git # Clone the repository.
cd openpgp-php
composer install # Use Composer to install the requirements.

Once Composer has installed the requirements, run the examples using PHP:

# Generate a new OpenPGP key; see the `keygen.php` file for parameters.
php ./examples/keygen.php > mykey.gpg