dave Thu Aug 5 04:54:12 2004 EDT
Modified files:
/phpdoc/en/reference/mcrypt/functions mcrypt-create-iv.xml
Log:
- Fix #28361 and encapsulate a few constants/filenames.
http://cvs.php.net/diff.php/phpdoc/en/reference/mcrypt/functions/mcrypt-create-iv.xml?r1=1.6&r2=1.7&ty=u
Index: phpdoc/en/reference/mcrypt/functions/mcrypt-create-iv.xml
diff -u phpdoc/en/reference/mcrypt/functions/mcrypt-create-iv.xml:1.6
phpdoc/en/reference/mcrypt/functions/mcrypt-create-iv.xml:1.7
--- phpdoc/en/reference/mcrypt/functions/mcrypt-create-iv.xml:1.6 Sun Jan 18
14:25:40 2004
+++ phpdoc/en/reference/mcrypt/functions/mcrypt-create-iv.xml Thu Aug 5 04:54:11
2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/mcrypt.xml, last change in rev 1.2 -->
<refentry id="function.mcrypt-create-iv">
<refnamediv>
@@ -24,13 +24,24 @@
<parameter>source</parameter> specifies the source of the IV.
</para>
<para>
- The source can be MCRYPT_RAND (system random number generator),
- MCRYPT_DEV_RANDOM (read data from /dev/random) and
- MCRYPT_DEV_URANDOM (read data from /dev/urandom). If you use
- MCRYPT_RAND, make sure to call srand() before to initialize the
- random number generator. MCRYPT_RAND is the only one supported on Windows
- because Windows (of course) doesn't have /dev/random or /dev/urandom.
+ The source can be <constant>MCRYPT_RAND</constant> (system random
+ number generator), <constant>MCRYPT_DEV_RANDOM</constant> (read
+ data from <filename>/dev/random</filename>) and
+ <constant>MCRYPT_DEV_URANDOM</constant> (read data from
+ <filename>/dev/urandom</filename>). <constant>MCRYPT_RAND</constant>
+ is the only one supported on Windows because Windows (of course)
+ doesn't have <filename>/dev/random</filename> or
+ <filename>/dev/urandom</filename>.
</para>
+ <note>
+ <para>
+ When using <constant>MCRYPT_RAND</constant>, remember to call
+ <function>srand</function> before
+ <function>mcrypt_create_iv</function> to initialize the random
+ number generator; it is not seeded automatically like
+ <function>rand</function> is.
+ </para>
+ </note>
<para>
<example>
<title><function>mcrypt_create_iv</function> example</title>