forked from demo/example
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
463 B
14 lines
463 B
package com.fr.decision.privilege.encrpt; |
|
|
|
import com.fr.security.SecurityToolbox; |
|
|
|
public class CustomSHA256PasswordValidator extends AbstractPasswordValidator { |
|
public CustomSHA256PasswordValidator() { |
|
} |
|
|
|
@Override |
|
public String encode(String originUserName, String originPassword) { //把 用户名+密码 加密成 SHA256字符 |
|
String unionPwd = originUserName + originPassword; |
|
return SecurityToolbox.sha256(unionPwd); |
|
} |
|
} |