(PECL gnupg >= 0.4)
gnupg_init — Initialize a connection
$options
null
options
Must be an associative array. It is used to change the default configuration of the crypto engine.
gpg
GNUPGHOME
A GnuPG resource connection used by other GnuPG functions.
Example #1 Procedural gnupg_init() example with default setting
<?php $res = gnupg_init(); ?>
Example #2 Procedural gnupg_init() example with overridden file name and home dir
<?php $res = gnupg_init(["file_name" => "/usr/bin/gpg2", "home_dir" => "/var/www/.gnupg"]); ?>
Example #3 OO gnupg initializer example with default setting
<?php $gpg = new gnupg(); ?>
Example #4 OO gnupg initializer example with overridden file name and home dir
<?php $gpg = new gnupg(["file_name" => "/usr/bin/gpg2", "home_dir" => "/var/www/.gnupg"]); ?>