note 86122 added to function.gnupg-import
| From: | dimitri at digirati dot com dot br | Date: | Sat, 04 Oct 2008 02:54:13 +0000 |
| Subject: | note 86122 added to function.gnupg-import | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145037@lists.php.net to get a copy of this message | ||
I recommend that the key may be generated in shell command line, then you export the keys using this
group of commands.
gpg --export -a "User Name" > public.key
gpg --export-secret-key -a "User Name" > private.key
to use it, at the import and use it for encryption and decryption.
<?php
$GnuPG = new gnupg();
$PublicData = file_get_contents('public.key');
$PrivateData = file_get_contents('public.key');
$PublicKey = $GnuPG->import($PublicData);
$PrivateKey = $GnuPG->import($PrivateData);
echo 'Public Key : ',$PublicKey['fingerprint'],' & Private Key :
',$PrivateKey['fingerprint'];
?>
----
Server IP: 69.147.83.197
Probable Submitter: 201.19.206.185
----
Manual Page -- http://www.php.net/manual/en/function.gnupg-import.php
Edit -- https://master.php.net/note/edit/86122
Del: integrated -- https://master.php.net/note/delete/86122/integrated
Del: useless -- https://master.php.net/note/delete/86122/useless
Del: bad code -- https://master.php.net/note/delete/86122/bad+code
Del: spam -- https://master.php.net/note/delete/86122/spam
Del: non-english -- https://master.php.net/note/delete/86122/non-english
Del: in docs -- https://master.php.net/note/delete/86122/in+docs
Del: other reasons-- https://master.php.net/note/delete/86122
Reject -- https://master.php.net/note/reject/86122
Search -- https://master.php.net/manage/user-notes.php