Funciones GnuPG

Notas

Esta extensión utiliza el trousseau del usuario actual. Este trousseau se encuentra normalmente en ~./.gnupg/. Para especificar una ubicación diferente, registrar la ruta del trousseau en la variable de entorno GNUPGHOME. Ver putenv para más información sobre cómo realizar esto.

Algunas funciones requieren la especificación de una clave. Esta especificación puede ser algo que haga referencia a una clave única (userid, key-id, fingerprint, ...). Esta documentación utiliza los fingerprint en todos los ejemplos.

Nota:

Como alternativa a las funciones que utilizan explícitamente los resource, también puede utilizarse un estilo orientado a objetos mediante objetos GnuPG.

Tabla de contenidos

add a note

User Contributed Notes 2 notes

up
8
phplist2REMOVE AT REMtincanOVE.co.uk
18 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
11 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