gnupg_init
gnupg_init
Initialize a connection
resource **gnupg_init** $options
optionsMust be an associative array. It is used to change the default configuration
of the crypto engine.
A GnuPG connection used by other GnuPG functions.
resource
Voorbeeld: Procedural example with default setting
<?php
$res = gnupg_init();
?>
Voorbeeld: Procedural example with overriden file name and home dir
<?php
$res = gnupg_init(["file_name" => "/usr/bin/gpg2", "home_dir" => "/var/www/.gnupg"]);
?>
Voorbeeld: OO gnupg initializer example with default setting
<?php
$gpg = new gnupg();
?>
Voorbeeld: OO gnupg initializer example with overriden file name and home dir
<?php
$gpg = new gnupg(["file_name" => "/usr/bin/gpg2", "home_dir" => "/var/www/.gnupg"]);
?>