cvs: phpdoc /en/reference/openssl/functions openssl-pkcs7-encrypt.xml
| From: | Andrew Lindeman | Date: | Thu, 25 Apr 2002 21:52:51 +0000 |
| Subject: | cvs: phpdoc /en/reference/openssl/functions openssl-pkcs7-encrypt.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969344869@lists.php.net to get a copy of this message | ||
alindeman Thu Apr 25 17:52:51 2002 EDT
Modified files:
/phpdoc/en/reference/openssl/functions openssl-pkcs7-encrypt.xml
Log:
fixing bug $16829
Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml
diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.2
phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.3
--- phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.2 Wed Apr 17 02:42:24 2002
+++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml Thu Apr 25 17:52:51 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 -->
<refentry id="function.openssl-pkcs7-encrypt">
<refnamediv>
@@ -50,13 +50,19 @@
HQ
EOD;
+
+// load key
+$key = implode("", file("my.pem"));
+
// save message to file
$fp = fopen("msg.txt", "w");
fwrite($fp, $data);
fclose($fp);
+
// encrypt it
-if (openssl_pkcs7_encrypt("msg.txt", "enc.txt", "nighthawk.pem",
- array("To" => "nighthawk@agent.com", // keyed syntax
+if (openssl_pkcs7_encrypt("msg.txt", "enc.txt", $key,
+ array("To" => "msisolak@gvpi.com", // keyed
+syntax
"From: HQ <hq@cia.com>", // indexed syntax
"Subject" => "Eyes only")))
{