mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-18 14:57:15 +08:00
refactor: 使用密码编码器重构密码加密、密码判断等相关处理
采用 BCryptPasswordEncoder,并动态兼容
This commit is contained in:
@@ -66,15 +66,4 @@ public class SecureUtils {
|
||||
public static String decryptByRsaPrivateKey(String data, String privateKey) {
|
||||
return new String(SecureUtil.rsa(privateKey, null).decrypt(Base64.decode(data), KeyType.PrivateKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* MD5 加密
|
||||
*
|
||||
* @param data 要加密的内容
|
||||
* @param salt 盐
|
||||
* @return 加密后的内容
|
||||
*/
|
||||
public static String md5Salt(String data, String salt) {
|
||||
return SecureUtil.md5(SecureUtil.md5(data) + salt);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user