类 PasswordUtils
java.lang.Object
club.zhcs.lina.auth.encode.PasswordUtils
- 作者:
- Kerbores(kerbores@riemann.tech)
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanMD5固定盐密码匹配static String加密static StringMD5固定盐多次摘要static String加盐迭代多次摘要static boolean验证密码是否匹配static StringrandomSaltEncode(String password) MD5随机盐摘要static StringrandomSaltEncode(String password, int iterations) MD5随机盐摘要static booleanrandomSaltVerify(String password, String md5) MD5随机盐摘要验证static booleanrandomSaltVerify(String password, String md5, int iterations) MD5随机盐摘要验证
-
构造器详细资料
-
PasswordUtils
public PasswordUtils()
-
-
方法详细资料
-
encode
加盐迭代多次摘要- 参数:
algorithm- 摘要算法password- 明文密码salt- 加密盐iterations- 迭代次数- 返回:
- 密文
-
encode
MD5固定盐多次摘要- 参数:
password- 明文密码salt- 加密盐- 返回:
- 密文
-
check
MD5固定盐密码匹配- 参数:
rawPassword- 明文密码salt- 盐password- 密文- 返回:
- 是否匹配
-
randomSaltEncode
MD5随机盐摘要- 参数:
password- 明文- 返回:
- 摘要
-
randomSaltEncode
MD5随机盐摘要- 参数:
password- 明文iterations- 迭代次数- 返回:
- 摘要
-
randomSaltVerify
MD5随机盐摘要验证- 参数:
password- 明文md5- 密文- 返回:
- 是否匹配
-
randomSaltVerify
MD5随机盐摘要验证- 参数:
password- 明文md5- 摘要iterations- 迭代次数- 返回:
- 是否匹配
-
encode
加密- 参数:
password- 明文密码- 返回:
- 密文
-
match
验证密码是否匹配- 参数:
rawPassword- 明文密码encodedPassword- 加密密码- 返回:
- 是否匹配
-