note 31311 added to function.openssl-public-encrypt
| From: | lonewolf at greyskydesigns dot com | Date: | Thu, 17 Apr 2003 03:28:10 +0000 |
| Subject: | note 31311 added to function.openssl-public-encrypt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46719@lists.php.net to get a copy of this message | ||
Easy way:
<?php
$publicKey = "file://path/to/public/key-crt.pem";
$plaintext = "String to encrypt";
openssl_public_encrypt($plaintext, $encrypted, $publicKey);
echo $encrypted; //encrypted string
?>
--
http://www.php.net/manual/en/function.openssl-public-encrypt.php
http://master.php.net/manage/user-notes.php?action=edit+31311
http://master.php.net/manage/user-notes.php?action=delete+31311
http://master.php.net/manage/user-notes.php?action=reject+31311