mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Improve CSPRNG reference verbiage.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337873 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
12b92ba1e3
commit
59083b5ec1
2 changed files with 14 additions and 7 deletions
|
@ -38,21 +38,23 @@
|
|||
<refsect1 role="returnvalues"><!-- {{{ -->
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a string containing the crypto-secure random bytes in binary format.
|
||||
Returns a string containing the requested number of cryptographically
|
||||
secure random bytes.
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="errors"><!-- {{{ -->
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Issues an <constant>E_WARNING</constant> and returns &false; when a sufficient source of randomness is unavailable.
|
||||
If an appropriate source of randomness cannot be found or an invalid number
|
||||
of bytes is given, an <classname>Error</classname> will be thrown.
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<example xml:id="random-bytes.example.basic"><!-- {{{ -->
|
||||
<title><function>random-bytes</function> example</title>
|
||||
<title><function>random_bytes</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
<term><parameter>min</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The lowest value to be returned down to <constant>PHP_INT_MIN</constant>.
|
||||
The lowest value to be returned, which must be
|
||||
<constant>PHP_INT_MIN</constant> or higher.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -37,7 +38,8 @@
|
|||
<term><parameter>max</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The highest value to be returned up to <constant>PHP_INT_MAX</constant>.
|
||||
The highest value to be returned, which must be less than or equal to
|
||||
<constant>PHP_INT_MAX</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -47,14 +49,17 @@
|
|||
<refsect1 role="returnvalues"><!-- {{{ -->
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a crypto-secure random integer.
|
||||
Returns a cryptographically secure random integer in the range
|
||||
<parameter>min</parameter> to <parameter>max</parameter>, inclusive.
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
<refsect1 role="errors"><!-- {{{ -->
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Issues an <constant>E_WARNING</constant> and returns &false; when a sufficient source of randomness is unavailable.
|
||||
If an appropriate source of randomness cannot be found, invalid parameters
|
||||
are given, or <parameter>max</parameter> is less than
|
||||
<parameter>min</parameter>, an <classname>Error</classname> will be thrown.
|
||||
</para>
|
||||
</refsect1><!-- }}} -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue