public class SpringSecurityPasswordEncoder extends Object implements PasswordEncoder
PasswordEncoder
from the Spring
Security Crypto package.
Add the spring-security-crypto
dependency to use this class.Constructor and Description |
---|
SpringSecurityPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder delegate) |
Modifier and Type | Method and Description |
---|---|
String |
encode(String password)
Encode a password.
|
org.springframework.security.crypto.password.PasswordEncoder |
getDelegate() |
boolean |
matches(String plainPassword,
String encodedPassword)
Validate if a plainPassword matches
|
public SpringSecurityPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder delegate)
public String encode(String password)
PasswordEncoder
encode
in interface PasswordEncoder
password
- the not encoded passwordpublic boolean matches(String plainPassword, String encodedPassword)
PasswordEncoder
matches
in interface PasswordEncoder
plainPassword
- the not encoded password to checkencodedPassword
- the encoded passwordtrue
if they matchpublic org.springframework.security.crypto.password.PasswordEncoder getDelegate()
Copyright © 2017. All rights reserved.