Skip to content

Commit 1a3694d

Browse files
committed
minor #6595 Added a note about "encoding vs. hashing" passwords (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Added a note about "encoding vs. hashing" passwords It's impossible to replace "encode" by "hash" in Symfony code/docs ... but we could add a short note about this to fix #5688. Commits ------- a5cb692 Added a note about "encoding vs. hashing" passwords
2 parents c8f4583 + a5cb692 commit 1a3694d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

book/security.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,12 @@ is defined by the ``target`` parameter above (e.g. the ``homepage``).
11481148
Dynamically Encoding a Password
11491149
-------------------------------
11501150

1151+
.. note::
1152+
1153+
For historical reasons, Symfony uses the term *"password encoding"* when it
1154+
should really refer to *"password hashing"*. The "encoders" are in fact
1155+
`cryptographic hash functions`_.
1156+
11511157
If, for example, you're storing users in the database, you'll need to encode
11521158
the users' passwords before inserting them. No matter what algorithm you
11531159
configure for your user object, the hashed password can always be determined
@@ -1319,4 +1325,5 @@ Learn More from the Cookbook
13191325

13201326
.. _`online tool`: https://www.dailycred.com/blog/12/bcrypt-calculator
13211327
.. _`frameworkextrabundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
1328+
.. _`cryptographic hash functions`: https://en.wikipedia.org/wiki/Cryptographic_hash_function
13221329
.. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle

0 commit comments

Comments
 (0)