@Test public void runTest() { assertEquals("4e14b71330132c92655bef624a43e1294f9159373f5a7407956b05bf95405dcf", SM3.sm3Hash("testing")); }
public static String sm3Hash(final String input) { SM3Digest sm3Digest = new SM3Digest(); sm3Digest.update(input.getBytes(), 0, input.length()); byte[] result = new byte[sm3Digest.getDigestSize()]; sm3Digest.doFinal(result, 0); return Hex.toHexString(result); }
SM3 { public static String sm3Hash(final String input) { SM3Digest sm3Digest = new SM3Digest(); sm3Digest.update(input.getBytes(), 0, input.length()); byte[] result = new byte[sm3Digest.getDigestSize()]; sm3Digest.doFinal(result, 0); return Hex.toHexString(result); } }
SM3 { public static String sm3Hash(final String input) { SM3Digest sm3Digest = new SM3Digest(); sm3Digest.update(input.getBytes(), 0, input.length()); byte[] result = new byte[sm3Digest.getDigestSize()]; sm3Digest.doFinal(result, 0); return Hex.toHexString(result); }  }
SM3 { public static String sm3Hash(final String input) { SM3Digest sm3Digest = new SM3Digest(); sm3Digest.update(input.getBytes(), 0, input.length()); byte[] result = new byte[sm3Digest.getDigestSize()]; sm3Digest.doFinal(result, 0); return Hex.toHexString(result); }  static void main(String[] args); static String sm3Hash(final String input); }
SM3 { public static String sm3Hash(final String input) { SM3Digest sm3Digest = new SM3Digest(); sm3Digest.update(input.getBytes(), 0, input.length()); byte[] result = new byte[sm3Digest.getDigestSize()]; sm3Digest.doFinal(result, 0); return Hex.toHexString(result); }  static void main(String[] args); static String sm3Hash(final String input);  }