Skip to content

Commit e1f01c6

Browse files
islamazharrwinch
authored andcommitted
mentioning the default strength of BCryptPasswordEncoder
Fixes gh-8542
1 parent c1f737c commit e1f01c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/manual/src/docs/asciidoc/_includes/about/authentication/password-storage.adoc

+2
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ https://docs.spring.io/spring-security/site/docs/5.0.x/api/org/springframework/s
272272
The `BCryptPasswordEncoder` implementation uses the widely supported https://en.wikipedia.org/wiki/Bcrypt[bcrypt] algorithm to hash the passwords.
273273
In order to make it more resistent to password cracking, bcrypt is deliberately slow.
274274
Like other adaptive one-way functions, it should be tuned to take about 1 second to verify a password on your system.
275+
The default implementation of `BCryptPasswordEncoder` uses strength 10 as mentioned on the Javadoc of https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/crypto/bcrypt/BCryptPasswordEncoder.html[BCryptPasswordEncoder]. Your are encouagred to
276+
tune and test the strength parameter on your own system so that it take roughly 1 second to verify a password.
275277

276278
[source,java]
277279
----

0 commit comments

Comments
 (0)