8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac45677 commit 18cd815Copy full SHA for 18cd815
components/security/secure_tools.rst
@@ -41,9 +41,8 @@ the number bytes passed as an argument (10 in the above example).
41
The ``random_bytes()`` function returns a binary string which may contain
42
the ``\0`` character. This can cause trouble in several common scenarios,
43
such as storing this value in a database or including it as part of the
44
- URL. The solution is to encode or hash the value returned by
45
- ``random_bytes()`` (to do that, you can use a simple ``base64_encode()``
46
- PHP function).
+ URL. The solution is to hash the value returned by ``random_bytes()`` with
+ a hashing function such as :phpfunction:`md5` or :phpfunction:`sha1`.
47
48
Generating a Secure Random Number
49
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments