Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : gnupg Functions : gnupg_decrypt

gnupg_decrypt

Decrypts a given text (PECL gnupg:0.1-1.3.1)
string gnupg_decrypt ( resource identifier, string text )

Example 834. Procedural gnupg_decrypt() example

<?php
$res
= gnupg_init();
gnupg_adddecryptkey($res,"8660281B6051D071D94B5B230549F9DC851566DC","test");
$plain = gnupg_decrypt($res,$encrypted_text);
echo
$plain;
?>

Example 835. OO gnupg_encrypt() example

<?php
$gpg
= new gnupg();
$gpg -> adddecryptkey("8660281B6051D071D94B5B230549F9DC851566DC","test");
$plain = $gpg -> decrypt($encrypted_text);
echo
$plain;
?>

Change Language


Follow Navioo On Twitter
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_keyinfo
gnupg_setarmor
gnupg_seterrormode
gnupg_setsignmode
gnupg_sign
gnupg_verify
eXTReMe Tracker