php-doc-en/reference/openssl/functions/openssl-pkcs7-decrypt.xml
Torben Wilson af4410a7e1 Normalized the sgml-default-dtd-file local-variable line for those
still using this, after discussion on the phpdoc list.
From now on, manual.ced will need to be found at ~/.phpdoc/manual.ced.



git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288721 c90b9560-bf6c-de11-be94-00142212c4b1
2009-09-25 07:04:39 +00:00

117 lines
3.1 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.openssl-pkcs7-decrypt">
<refnamediv>
<refname>openssl_pkcs7_decrypt</refname>
<refpurpose>Decrypts an S/MIME encrypted message</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>openssl_pkcs7_decrypt</methodname>
<methodparam><type>string</type><parameter>infilename</parameter></methodparam>
<methodparam><type>string</type><parameter>outfilename</parameter></methodparam>
<methodparam><type>mixed</type><parameter>recipcert</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>recipkey</parameter></methodparam>
</methodsynopsis>
<para>
Decrypts the S/MIME encrypted message contained in the file specified by
<parameter>infilename</parameter> using the certificate and its
associated private key specified by <parameter>recipcert</parameter> and
<parameter>recipkey</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>infilename</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>outfilename</parameter></term>
<listitem>
<para>
The decrypted message is written to the file specified by
<parameter>outfilename</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>recipcert</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>recipkey</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>openssl_pkcs7_decrypt</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
// $cert and $key are assumed to contain your personal certificate and private
// key pair, and that you are the recipient of an S/MIME message
$infilename = "encrypted.msg"; // this file holds your encrypted message
$outfilename = "decrypted.msg"; // make sure you can write to this file
if (openssl_pkcs7_decrypt($infilename, $outfilename, $cert, $key)) {
echo "decrypted!";
} else {
echo "failed to decrypt!";
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->