public class ShiroPasswordEncoder extends Object implements PasswordEncoder
PasswordService from Apache Shiro
Add the shiro-core dependency to use this class.| Constructor and Description |
|---|
ShiroPasswordEncoder(org.apache.shiro.authc.credential.PasswordService delegate) |
| Modifier and Type | Method and Description |
|---|---|
String |
encode(String password)
Encode a password.
|
org.apache.shiro.authc.credential.PasswordService |
getDelegate() |
boolean |
matches(String plainPassword,
String encodedPassword)
Validate if a plainPassword matches
|
void |
setDelegate(org.apache.shiro.authc.credential.PasswordService delegate) |
public ShiroPasswordEncoder(org.apache.shiro.authc.credential.PasswordService delegate)
public String encode(String password)
PasswordEncoderencode in interface PasswordEncoderpassword - the not encoded passwordpublic boolean matches(String plainPassword, String encodedPassword)
PasswordEncodermatches in interface PasswordEncoderplainPassword - the not encoded password to checkencodedPassword - the encoded passwordtrue if they matchpublic org.apache.shiro.authc.credential.PasswordService getDelegate()
public void setDelegate(org.apache.shiro.authc.credential.PasswordService delegate)
Copyright © 2017. All Rights Reserved.