File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ to work correctly. Just pass a file name to enable it::
50
50
use Symfony\Component\Security\Core\Util\SecureRandom;
51
51
52
52
$generator = new SecureRandom('/some/path/to/store/the/seed.txt');
53
+
53
54
$random = $generator->nextBytes(10);
55
+ $hashedRandom = md5($random); // see tip below
54
56
55
57
.. note ::
56
58
@@ -60,7 +62,7 @@ to work correctly. Just pass a file name to enable it::
60
62
.. tip ::
61
63
62
64
The ``nextBytes() `` method returns a binary string which may contain the
63
- ``\0 `` character. This can cause troubles in lots of common scenarios, such
65
+ ``\0 `` character. This can cause trouble in several common scenarios, such
64
66
as storing this value in a database or including it as part of the URL. The
65
67
solution is to hash the value returned by ``nextBytes() `` (to do that, you
66
68
can use a simple ``md5() `` PHP function).
You can’t perform that action at this time.
0 commit comments