gnupg_adddecryptkey
(PECL gnupg:0.5-1.3.1)
gnupg_adddecryptkey — Add a key for decryption
Описание
bool gnupg_adddecryptkey
( resource $identifier
, string $fingerprint
, string $passphrase
)
Возвращаемые значения
Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.
Примеры
Пример #1 Procedural gnupg_adddecryptkey() example
<?php
$res = gnupg_init();
gnupg_adddecryptkey($res,"8660281B6051D071D94B5B230549F9DC851566DC","test");
?>
Пример #2 OO gnupg_adddecryptkey() example
<?php
$gpg = new gnupg();
$gpg -> adddecryptkey("8660281B6051D071D94B5B230549F9DC851566DC","test");
?>
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Генерация нетекстовых MIME форматов
- GNU Privacy Guard
- gnupg_adddecryptkey
- gnupg_addencryptkey
- gnupg_addsignkey
- gnupg_cleardecryptkeys
- gnupg_clearencryptkeys
- gnupg_clearsignkeys
- gnupg_decrypt
- gnupg_decryptverify
- gnupg_encrypt
- gnupg_encryptsign
- gnupg_export
- gnupg_geterror
- gnupg_getprotocol
- gnupg_import
- gnupg_init
- gnupg_keyinfo
- gnupg_setarmor
- gnupg_seterrormode
- gnupg_setsignmode
- gnupg_sign
- gnupg_verify
Коментарии
I am installed
For Ubuntu 12.04, these are the steps:
1. Install packages: gnupg libgpg-error-dev libassuan-dev
2. Download GPGME library from http://www.gnupg.org/download/index.en.html#gpgme
3. Extract, then run
configure
make && sudo make install
4. Install PECL extension
sudo pecl install gnupg
5. Add to php.ini
extension=gnupg.so
---
I create new example.php
$gpg = new gnupg();
$test = $gpg->adddecryptkey("8660281B6051D071D94B5B230549F9DC851566DC","test");
var_dump($test);
Run returns "bool(false)"
Please help me .