!342 加解密工具类中增加常用的sm3算法

Merge pull request !342 from _老马_/dev
This commit is contained in:
疯狂的狮子Li 2023-04-28 14:43:27 +00:00 committed by Gitee
commit 9e8a58af43
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -230,4 +230,14 @@ public class EncryptUtils {
return SecureUtil.sha256(data);
}
/**
* sm3加密
*
* @param data 待加密数据
* @return 加密后字符串, 采用Hex编码
*/
public static String encryptBySm3(String data) {
return SmUtil.sm3(data);
}
}