File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 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::
5050 use Symfony\Component\Security\Core\Util\SecureRandom;
5151
5252 $generator = new SecureRandom('/some/path/to/store/the/seed.txt');
53+
5354 $random = $generator->nextBytes(10);
55+ $hashedRandom = md5($random); // see tip below
5456
5557.. note ::
5658
@@ -60,7 +62,7 @@ to work correctly. Just pass a file name to enable it::
6062.. tip ::
6163
6264 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
6466 as storing this value in a database or including it as part of the URL. The
6567 solution is to hash the value returned by ``nextBytes() `` (to do that, you
6668 can use a simple ``md5() `` PHP function).
You can’t perform that action at this time.
0 commit comments