Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: gnupg_encrypt - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net

search for in the

gnupg_encryptsign" width="11" height="7"/> <gnupg_decryptverify
Last updated: Sun, 07 May 2006
view this page in

gnupg_encrypt

(no version information, might be only in CVS)

gnupg_encrypt -- 指定したテキストを暗号化する

説明

string gnupg_encrypt ( resource identifier, string plaintext )

事前に gnupg_addencryptkey で設定したキーを使用し、指定されたテキストを暗号化します。暗号化された テキストを返します。

返り値

成功した場合、この関数は暗号化されたテキストを返します。 失敗した場合、この関数は FALSE を返します。

例 1. 手続き型の gnupg_encrypt() の例

<?php
$res
= gnupg_init();
gnupg_addencryptkey($res,"8660281B6051D071D94B5B230549F9DC851566DC");
$enc = gnupg_encrypt($res, "just a test");
echo
$enc;
?>

例 2. オブジェクト指向の gnupg_encrypt() の例

<?php
$gpg
= new gnupg();
$gpg -> addencryptkey("8660281B6051D071D94B5B230549F9DC851566DC");
$enc = $gpg -> encrypt("just a test");
echo
$enc;
?>



add a note add a note User Contributed Notes
gnupg_encrypt
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites