2009-11-19 13:13:35 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 08:26:23 +00:00
|
|
|
<!-- $Revision$ -->
|
2009-07-01 07:34:07 +00:00
|
|
|
|
|
|
|
<refentry xml:id="function.openssl-decrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>openssl_decrypt</refname>
|
|
|
|
<refpurpose>Decrypts data</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
2009-07-27 07:39:01 +00:00
|
|
|
<type>string</type><methodname>openssl_decrypt</methodname>
|
2009-07-01 07:34:07 +00:00
|
|
|
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
|
|
|
<methodparam><type>string</type><parameter>method</parameter></methodparam>
|
|
|
|
<methodparam><type>string</type><parameter>password</parameter></methodparam>
|
2013-03-18 23:18:14 +00:00
|
|
|
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
|
2011-02-11 13:16:13 +00:00
|
|
|
<methodparam choice="opt"><type>string</type><parameter>iv</parameter><initializer>""</initializer></methodparam>
|
2009-07-01 07:34:07 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Takes a raw or base64 encoded string and decrypts it using a given method and key.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
&warn.undocumented.func;
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>data</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The data.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>method</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The cipher method.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>password</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The password.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2013-03-18 23:18:14 +00:00
|
|
|
<term><parameter>options</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<parameter>options</parameter> can be one of
|
|
|
|
<constant>OPENSSL_RAW_DATA</constant>,
|
|
|
|
<constant>OPENSSL_ZERO_PADDING</constant>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2009-07-01 07:34:07 +00:00
|
|
|
</varlistentry>
|
2011-05-02 21:35:04 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>iv</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
A non-NULL Initialization Vector.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-07-01 07:34:07 +00:00
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
2009-11-09 10:26:08 +00:00
|
|
|
The decrypted string on success&return.falseforfailure;.
|
2009-07-01 07:34:07 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="errors">
|
|
|
|
&reftitle.errors;
|
|
|
|
<para>
|
|
|
|
Emits an <constant>E_WARNING</constant> level error if an unknown cipher algorithm
|
|
|
|
is passed via the <parameter>method</parameter> parameter.
|
|
|
|
</para>
|
2011-05-02 21:35:04 +00:00
|
|
|
<para>
|
|
|
|
Emits an <constant>E_WARNING</constant> level error if an empty value is passed
|
|
|
|
in via the <parameter>iv</parameter> parameter.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="changelog">
|
|
|
|
&reftitle.changelog;
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="2">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>&Version;</entry>
|
|
|
|
<entry>&Description;</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
|
|
|
<entry>5.3.3</entry>
|
|
|
|
<entry>
|
|
|
|
The <parameter>iv</parameter> parameter was added.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2013-03-18 23:18:14 +00:00
|
|
|
<row>
|
|
|
|
<entry>5.4.0</entry>
|
|
|
|
<entry>
|
|
|
|
The <parameter>raw_output</parameter> was changed to <parameter>options</parameter>.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2011-05-02 21:35:04 +00:00
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
2009-07-01 07:34:07 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><function>openssl_encrypt</function></member>
|
|
|
|
</simplelist>
|
|
|
|
</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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2009-07-01 07:34:07 +00:00
|
|
|
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
|
|
|
|
-->
|