File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
1718BREAKING
1819********
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments