Funções de GnuPG

Notas

Esta extensão utiliza o chaveiro do usuário atual. Este chaveiro normalmente está localizado em ~./.gnupg/. Para especificar um local personalizado, armazene o caminho para o chaveiro na variável de ambiente GNUPGHOME. Consulte putenv para obter mais informações sobre como fazer isso.

Algumas funções requerem a especificação de uma chave. Esta especificação pode ser qualquer coisa que se refira a uma chave exclusiva (userid, key-id, impressão digital, ...). Esta documentação usa a impressão digital em todos os exemplos.

Nota:

Como alternativa às funções explicitamente documentadas usando resources, você também pode usar um estilo orientado a objetos usando objetos gnupg.

Índice

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