Skip to content

Commit 9ea7ce3

Browse files
committed
docs: update docs
1 parent 4f4a110 commit 9ea7ce3

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

user_guide_src/source/changelogs/v4.3.3.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ SECURITY
1313
********
1414

1515
- **Email:** Added missing TLS 1.3 support.
16+
- **Text Helper:** The :php:func:`random_string()` type **numeric** is now cryptographically secure.
1617

1718
BREAKING
1819
********

user_guide_src/source/helpers/text_helper.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The following functions are available:
3030
Generates a random string based on the type and length you specify.
3131
Useful for creating passwords or generating random hashes.
3232

33-
.. warning:: Except for type **crypto**, no cryptographically secure
33+
.. warning:: Except for type **numeric** and **crypto**, no cryptographically secure
3434
strings are generated. Therefore, it must not be used for cryptographic
3535
purposes or purposes that requires return values to be unguessable.
3636

@@ -49,6 +49,9 @@ The following functions are available:
4949
.. note:: When you use **crypto**, you must set an even number to the second parameter.
5050
Since v4.2.2, if you set an odd number, ``InvalidArgumentException`` will be thrown.
5151

52+
.. note:: Since v4.3.3, **numeric** uses ``random_int()``. In the previous
53+
versions, it used ``str_shuffle()`` that is not cryptographically secure.
54+
5255
Usage example:
5356

5457
.. literalinclude:: text_helper/002.php

0 commit comments

Comments
 (0)