refactor: refactoring code; update encryption algorithm; add build ci;

This commit is contained in:
merlin
2025-11-02 00:03:16 +08:00
parent e4f032a7f0
commit 62ded00cb3
15 changed files with 330 additions and 53 deletions

View File

@@ -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);
}
}