Fw: [PHP] encrypt data with pgp
| From: | Ermelir | Date: | Tue, 21 Jan 2003 22:22:37 +0000 |
| Subject: | Fw: [PHP] encrypt data with pgp | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-132512@lists.php.net to get a copy of this message | ||
just for explain me another better: if I had post in this mailing list, it's
just because I want to find another way to use this function under windows
system
function pgp_encrypt($keyring_location, $public_key_id, $plain_text) {
$key_id = EscapeShellArg($public_key_id);
putenv("PGPPATH=$keyring_location");
// encrypt the message
$pipe = popen("pgpe -r $key_id -af", "r");
fwrite($pipe, $plain_text);
$encrypted_text = '';
while($s = fgets($pipe, 1024)) {
// read from the pipe
$encrypted_text .= $s;
}
pclose($pipe);
return $encrypted_text; }
thanks for the tip on winPT, I will try it and will post the code of the
function I will developp if some are interest in...
_____________________________________________________________________
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms