reference/openssl/functions/openssl-decrypt.xml
9fc8bcc0836f56a98cf432c8f933e0d96c8d680a
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="function.openssl-decrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>openssl_decrypt</refname>
...
...
@@ -10,13 +9,13 @@
10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
11
<methodsynopsis>
13
-
<type>string</type><methodname>openssl_decrypt</methodname>
12
+
<type class="union"><type>string</type><type>false</type></type><methodname>openssl_decrypt</methodname>
14
13
<methodparam><type>string</type><parameter>data</parameter></methodparam>
15
-
<methodparam><type>string</type><parameter>method</parameter></methodparam>
16
-
<methodparam><type>string</type><parameter>key</parameter></methodparam>
14
+
<methodparam><type>string</type><parameter>cipher_algo</parameter></methodparam>
15
+
<methodparam><type>string</type><parameter>passphrase</parameter></methodparam>
17
16
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
18
17
<methodparam choice="opt"><type>string</type><parameter>iv</parameter><initializer>""</initializer></methodparam>
19
-
<methodparam choice="opt"><type>string</type><parameter>tag</parameter><initializer>""</initializer></methodparam>
18
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>tag</parameter><initializer>&null;</initializer></methodparam>
20
19
<methodparam choice="opt"><type>string</type><parameter>aad</parameter><initializer>""</initializer></methodparam>
21
20
</methodsynopsis>
22
21
<para>
...
...
@@ -38,7 +37,7 @@
38
37
</listitem>
39
38
</varlistentry>
40
39
<varlistentry>
41
-
<term><parameter>method</parameter></term>
40
+
<term><parameter>cipher_algo</parameter></term>
42
41
<listitem>
43
42
<para>
44
43
The cipher method. For a list of available cipher methods, use
...
...
@@ -47,7 +46,7 @@
47
46
</listitem>
48
47
</varlistentry>
49
48
<varlistentry>
50
-
<term><parameter>key</parameter></term>
49
+
<term><parameter>passphrase</parameter></term>
51
50
<listitem>
52
51
<para>
53
52
The key.
...
...
@@ -78,13 +77,22 @@
78
77
<para>
79
78
The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns &false;.
80
79
</para>
80
+
<caution>
81
+
<simpara>
82
+
The length of the <parameter>tag</parameter> is not checked by the function.
83
+
It is the caller's responsibility to ensure that the length of the tag
84
+
matches the length of the tag retrieved when <function>openssl_encrypt</function>
85
+
has been called. Otherwise the decryption may succeed if the given tag only
86
+
matches the start of the proper tag.
87
+
</simpara>
88
+
</caution>
81
89
</listitem>
82
90
</varlistentry>
83
91
<varlistentry>
84
92
<term><parameter>aad</parameter></term>
85
93
<listitem>
86
94
<para>
87
-
Additional authentication data.
95
+
Additional authenticated data.
88
96
</para>
89
97
</listitem>
90
98
</varlistentry>
...
...
@@ -103,7 +111,7 @@
103
111
&reftitle.errors;
104
112
<para>
105
113
Emits an <constant>E_WARNING</constant> level error if an unknown cipher algorithm
106
-
is passed via the <parameter>method</parameter> parameter.
114
+
is passed via the <parameter>cipher_algo</parameter> parameter.
107
115
</para>
108
116
<para>
109
117
Emits an <constant>E_WARNING</constant> level error if an empty value is passed
...
...
@@ -123,16 +131,8 @@
123
131
</thead>
124
132
<tbody>
125
133
<row>
126
-
<entry>5.3.3</entry>
127
-
<entry>
128
-
The <parameter>iv</parameter> parameter was added.
129
-
</entry>
130
-
</row>
131
-
<row>
132
-
<entry>5.4.0</entry>
133
-
<entry>
134
-
The <parameter>raw_output</parameter> was changed to <parameter>options</parameter>.
135
-
</entry>
134
+
<entry>8.1.0</entry>
135
+
<entry><parameter>tag</parameter> is now nullable.</entry>
136
136
</row>
137
137
<row>
138
138
<entry>7.1.0</entry>
...
...
@@ -153,7 +153,6 @@
153
153
</refsect1>
154
154

155
155
</refentry>
156
-

157
156
<!-- Keep this comment at the end of the file
158
157
Local variables:
159
158
mode: sgml
160
159