Skip to content

Commit a0e9eb3

Browse files
committed
Deprecate NoOpPasswordEncoder
Issue: gh-2776
1 parent 52560b5 commit a0e9eb3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crypto/src/main/java/org/springframework/security/crypto/password/NoOpPasswordEncoder.java

+8
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,19 @@
1616
package org.springframework.security.crypto.password;
1717

1818
/**
19+
* This {@link PasswordEncoder} is provided for legacy and testing purposes only and is
20+
* not considered secure.
21+
*
1922
* A password encoder that does nothing. Useful for testing where working with plain text
2023
* passwords may be preferred.
2124
*
2225
* @author Keith Donald
26+
* @deprecated Digest based password encoding is not considered secure. Instead use an
27+
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
28+
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
29+
* password upgrades.
2330
*/
31+
@Deprecated
2432
public final class NoOpPasswordEncoder implements PasswordEncoder {
2533

2634
public String encode(CharSequence rawPassword) {

0 commit comments

Comments
 (0)