[nycphp-talk] Digital Signatures in PHP
David Rydell
drydell at att.net
Fri Jun 4 03:03:09 EDT 2004
> > Yea, sometimes I wish you could just pipe data to gpg and have it
spit...
You can pipe data to gpg directly... this snippet is from my email class,
which does exactly that:
$enc = chunk_split(base64_encode(shell_exec("echo '$data' |
/usr/bin/gpg --homedir /user/.gnupg --compress-algo 1 --cipher-algo
3des -e -r $recipient 2>> /user/cgi-logs/gpg.log")));
(note the compression/cipher is completely compatible with pgp)
I got the technique from browsing their website http://www.gnupg.org/
More information about the talk
mailing list