新增可以传入秘钥的SM3加密工具方法

This commit is contained in:
李国鹏 2021-11-04 09:35:40 +00:00 committed by Gitee
parent 9c6339a99c
commit a9a4143bee

View File

@ -133,6 +133,16 @@ public class SmUtil {
return new SM3();
}
/**
* SM3加密可以传入盐<br>
*
* @param salt 加密盐
* @return {@link SM3}
*/
public static SM3 sm3(byte[] salt) {
return new SM3(salt);
}
/**
* SM3加密生成16进制SM3字符串<br>
*