refactor: refactoring code; update encryption algorithm; add build ci;
This commit is contained in:
@@ -45,12 +45,9 @@ public class SHA256Util {
|
||||
* @param password 用户输入的密码
|
||||
* @return 加密后的密码哈希值
|
||||
*/
|
||||
@Value("${jwt.salt}")
|
||||
private String salt;
|
||||
|
||||
public String encryptPassword(String password) {
|
||||
String s = encryptSHA256(salt);
|
||||
// 将盐值与密码拼接后进行SHA-256加密
|
||||
return encryptSHA256(s +s + password + s);
|
||||
return encryptSHA256( password);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user