gm4j is the implementation of the Chinese security standardization algorithm in java.
see Chinese cryptography standardization technical committee
Calculate the SM3 hash value of byte[]
byte[]abc="abc".getBytes(StandardCharsets.US_ASCII); GMUtil.sm3(abc); // or GMProvider provider=new GMProvider(); MessageDigest digest=MessageDigest.getInstance("SM3", provider); digest.digest(abc);
Calculate the SM3 hash value of string
GMUtil.sm3("abc");
Calculate the SM3 hash string of the string and convert it to a hexadecimal string
GMUtil.sm3Hex("abc");
1.License
This code is under the Apache Licence v2.
2.Contact me
hello.bug@foxmail.com
There was an error while loading. Please reload this page.