CakeFest 2024: The Official CakePHP Conference

GnuPG 関数

注意

この拡張モジュールは、現在のユーザーのキーリングを使用します。キーリングは、 通常は ~./.gnupg/ にあります。別の場所を指定するには、環境変数 GNUPGHOME にキーリングへのパスを格納します。その詳細な方法については putenv を参照ください。

キーを特定する設定項目を必要とする関数も存在します。この設定項目は、何らかの ユニークなキー (ユーザー ID、キー ID、フィンガープリント、…) を参照します。 このドキュメントでは、すべての例でフィンガープリントを使用しています。

注意:

ドキュメントで明示されている関数 (resource を用いるもの) を使う以外に、 gnupg オブジェクトによるオブジェクト指向型の方法を使うこともできます。

目次

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