(PECL gnupg >= 0.5)
gnupg_addsignkey — Ajoute une clé pour signer
$identifier
, string $fingerprint
[, string $passphrase
] ) : bool
identifierL'identifiant gnupg, généré par un appel à la fonction gnupg_init() ou à la fonction gnupg.
fingerprintL'empreinte de la clé.
passphraseLa phrase de passe (comme le mot de passe, mais plus long).
Cette fonction retourne TRUE en cas de succès ou FALSE si une erreur survient.
Exemple #1 Exemple avec gnupg_addsignkey() (Style procédural)
<?php
$res = gnupg_init();
gnupg_addsignkey($res,"8660281B6051D071D94B5B230549F9DC851566DC","test");
?>
Exemple #2 Exemple avec gnupg_addsignkey() (Style orienté objet)
<?php
$gpg = new gnupg();
$gpg -> addsignkey("8660281B6051D071D94B5B230549F9DC851566DC","test");
?>