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" => "[EMAIL PROTECTED]", // keyed syntax
+if (openssl_pkcs7_encrypt("msg.txt", "enc.txt", $key,
+ array("To" => "[EMAIL PROTECTED]", // keyed
+syntax
"From: HQ <[EMAIL PROTECTED]>", // indexed syntax
"Subject" => "Eyes only")))
{