File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -5,22 +5,6 @@ The Symfony Security component comes with a collection of nice utilities
5
5
related to security. These utilities are used by Symfony, but you should
6
6
also use them if you want to solve the problem they address.
7
7
8
- Comparing Strings
9
- ~~~~~~~~~~~~~~~~~
10
-
11
- The time it takes to compare two strings depends on their differences. This
12
- can be used by an attacker when the two strings represent a password for
13
- instance; it is known as a `Timing attack `_.
14
-
15
- Internally, when comparing two passwords, Symfony uses a constant-time
16
- algorithm; you can use the same strategy in your own code thanks to the
17
- :class: `Symfony\\ Component\\ Security\\ Core\\ Util\\ StringUtils ` class::
18
-
19
- use Symfony\Component\Security\Core\Util\StringUtils;
20
-
21
- // is some known string (e.g. password) equal to some user input?
22
- $bool = StringUtils::equals($knownString, $userInput);
23
-
24
8
Generating a Secure random Number
25
9
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
10
You can’t perform that action at this time.
0 commit comments