org.bdware.doipv3.SM3Tool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doip-audit-tool Show documentation
Show all versions of doip-audit-tool Show documentation
doip audit tool developed by bdware
The newest version!
package org.bdware.doipv3;
import org.bouncycastle.pqc.math.linearalgebra.ByteUtils;
import org.zz.gmhelper.SM3Util;
public class SM3Tool {
public static String calculateSM3(String id) {
byte[] address = SM3Util.hash(id.getBytes());
String addressInStr = ByteUtils.toHexString(address);
return addressInStr;
}
public static byte[] calculateSM3InBytes(String id) {
byte[] address = SM3Util.hash(id.getBytes());
return address;
}
}