[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/_language-snippets.ent_reference/mcrypt/functions/mcrypt-d
From: Nikita_Popov <nikic () php ! net>
Date: 2014-10-15 20:01:03
Message-ID: svn-nikic-1413403263-335065-1483253583 () svn ! php ! net
[Download RAW message or body]
nikic Wed, 15 Oct 2014 20:01:03 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=335065
Log:
Update mcrypt_encrypt and mcrypt_decrypt docs for PHP 5.6
Changed paths:
U phpdoc/en/trunk/language-snippets.ent
U phpdoc/en/trunk/reference/mcrypt/functions/mcrypt-decrypt.xml
U phpdoc/en/trunk/reference/mcrypt/functions/mcrypt-encrypt.xml
Modified: phpdoc/en/trunk/language-snippets.ent
===================================================================
--- phpdoc/en/trunk/language-snippets.ent 2014-10-15 19:56:57 UTC (rev 335064)
+++ phpdoc/en/trunk/language-snippets.ent 2014-10-15 20:01:03 UTC (rev 335065)
@@ -522,6 +522,8 @@
<!ENTITY mcrypt.parameter.iv '<para xmlns="http://docbook.org/ns/docbook">Used for \
the initialization in CBC, CFB, OFB modes, and in some algorithms in STREAM mode. If \
you do not supply an IV, while it is needed for an algorithm, the function issues a \
warning and uses an IV with all its bytes set to "<literal>\0</literal>".</para>'>
+<!ENTITY mcrypt.parameter.iv.strict '<para \
xmlns="http://docbook.org/ns/docbook">Used for the initialization in CBC, CFB, OFB \
modes, and in some algorithms in STREAM mode. If the provided IV size is not \
supported by the chaining mode or no IV was provided, but the chaining mode requires \
one, the function will emit a warning and return &false;.</para>'> +
<!ENTITY mcrypt.parameter.mode '<para xmlns="http://docbook.org/ns/docbook">One of \
the <constant>MCRYPT_MODE_modename</constant> constants, or one of the following \
strings: "ecb", "cbc", "cfb", "ofb", "nofb" or "stream".</para>'>
<!-- MCVE notes -->
Modified: phpdoc/en/trunk/reference/mcrypt/functions/mcrypt-decrypt.xml
===================================================================
--- phpdoc/en/trunk/reference/mcrypt/functions/mcrypt-decrypt.xml 2014-10-15 19:56:57 \
UTC (rev 335064)
+++ phpdoc/en/trunk/reference/mcrypt/functions/mcrypt-decrypt.xml 2014-10-15 20:01:03 \
UTC (rev 335065) @@ -33,9 +33,8 @@
<term><parameter>key</parameter></term>
<listitem>
<para>
- The key with which the data was encrypted. If it's smaller
- than the required keysize, it is padded with
- '<literal>\0</literal>'.
+ The key with which the data was encrypted. If the provided key size is
+ not supported by the cipher, the function will emit a warning and return \
&false; </para>
</listitem>
</varlistentry>
@@ -58,18 +57,55 @@
<varlistentry>
<term><parameter>iv</parameter></term>
<listitem>
- &mcrypt.parameter.iv;
+ &mcrypt.parameter.iv.strict;
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
+
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns the decrypted data as a string.
+ Returns the decrypted data as a string &return.falseforfailure;.
</para>
</refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.6.0</entry>
+ <entry>
+ Invalid <parameter>key</parameter> and <parameter>iv</parameter> sizes
+ are no longer accepted. <function>mcrypt_decrypt</function> will now throw
+ a warning and return &false; if the inputs are invalid. Previously keys and
+ IVs were padded with '<literal>\0</literal>' bytes to the next valid size.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>mcrypt_encrypt</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Modified: phpdoc/en/trunk/reference/mcrypt/functions/mcrypt-encrypt.xml
===================================================================
--- phpdoc/en/trunk/reference/mcrypt/functions/mcrypt-encrypt.xml 2014-10-15 19:56:57 \
UTC (rev 335064)
+++ phpdoc/en/trunk/reference/mcrypt/functions/mcrypt-encrypt.xml 2014-10-15 20:01:03 \
UTC (rev 335065) @@ -35,14 +35,9 @@
<term><parameter>key</parameter></term>
<listitem>
<para>
- The key with which the data will be encrypted. If it's smaller than
- the required keysize, it is padded with '<literal>\0</literal>'. It is
- better not to use ASCII strings for keys.
+ The key with which the data will be encrypted. If the provided key size is
+ not supported by the cipher, the function will emit a warning and return \
&false; </para>
- <para>
- It is recommended to use the mhash functions to create a key from a
- string.
- </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -68,7 +63,7 @@
<varlistentry>
<term><parameter>iv</parameter></term>
<listitem>
- &mcrypt.parameter.iv;
+ &mcrypt.parameter.iv.strict;
</listitem>
</varlistentry>
</variablelist>
@@ -78,9 +73,36 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns the encrypted data, as a string.
+ Returns the encrypted data as a string &return.falseforfailure;.
</para>
</refsect1>
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.6.0</entry>
+ <entry>
+ Invalid <parameter>key</parameter> and <parameter>iv</parameter> sizes
+ are no longer accepted. <function>mcrypt_encrypt</function> will now throw
+ a warning and return &false; if the inputs are invalid. Previously keys and
+ IVs were padded with '<literal>\0</literal>' bytes to the next valid size.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
<refsect1 role="examples">
&reftitle.examples;
@@ -156,9 +178,15 @@
</screen>
</example>
</para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also <function>mcrypt_module_open</function> for a more advanced API
- and an example.
+ <simplelist>
+ <member><function>mcrypt_decrypt</function></member>
+ <member><function>mcrypt_module_open</function></member>
+ </simplelist>
</para>
</refsect1>
</refentry>
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic