add method

This commit is contained in:
Looly
2021-11-06 01:17:08 +08:00
parent 470168e11b
commit e58c8c9d6c
3 changed files with 53 additions and 21 deletions

View File

@@ -54,7 +54,7 @@ public class SmUtil {
public static final ECDomainParameters SM2_DOMAIN_PARAMS = BCUtil.toDomainParams(GMNamedCurves.getByName(SM2_CURVE_NAME));
/**
* SM2国密算法公钥参数的Oid标识
*/
*/
public static final ASN1ObjectIdentifier ID_SM2_PUBLIC_KEY_PARAM = new ASN1ObjectIdentifier("1.2.156.10197.1.301");
/**
@@ -134,12 +134,13 @@ public class SmUtil {
}
/**
* SM3加密可以传入盐<br>
* SM3加密可以传入盐
*
* @param salt 加密盐
* @return {@link SM3}
* @since 5.7.16
*/
public static SM3 sm3(byte[] salt) {
public static SM3 sm3WithSalt(byte[] salt) {
return new SM3(salt);
}