PHP 8.3.4 Released!

Funciones de GnuPG

Notas

Esta extensión hace uso del llavero de claves del usuario actual. Este llavero generalmente se encuentra en ~./.gnupg/. Para especificar una localización diferente, almacenar el path en la variable de entorno GNUPGHOME. Ver putenv para más información sobre cómo realizarlo.

Algunas funciones requieren especificar alguna clave. Se puede espeficicar mediante cualquiera cosa que se refiera a una clave única (userid, key-id, fingerprint, ...). Esta documentación usa el fingerprint para todos los ejemplos.

Tabla de contenidos

add a note

User Contributed Notes 2 notes

up
10
phplist2REMOVE AT REMtincanOVE.co.uk
17 years ago
There's a function/method missing in the list.

gnupg_deletekey

(no version information, might be only in CVS)

gnupg_deletekey -- Delete a key

Description

bool gnupg_deletekey ( resource identifier, string key, [bool allowsecret] )

Deletes the key from the keyring. If allowsecret is not set or FALSE it will fail on deleting secret keys.

Return Values

On success, this function returns TRUE. On failure, this function returns FALSE.

Examples

Example 1. Procedural gnupg_deletekey() example

<?php
$res
= gnupg_init();
gnupg_deletekey($res,"8660281B6051D071D94B5B230549F9DC851566DC");
?>

Example 2. OO gnupg_deletekey() example
<?php
$gpg
= new gnupg();
$gpg -> deletekey("8660281B6051D071D94B5B230549F9DC851566DC");
?>
up
6
web at rlauzier dot com
10 years ago
The function for listing all key signatures is also missing from the list...

gnupg_listsignatures

Examples:

$gpg = new gnupg();
$result = $gpg->listsignatures($fingerprint);

$gpg = gnupg_init();
$result = gnupg_listsignatures($gpg, $fingerprint);
To Top