This commit is contained in:
Looly 2021-05-13 07:34:29 +08:00
parent 7f2f97353c
commit 389ce1d27e

View File

@ -14,18 +14,18 @@ import javax.crypto.SecretKey;
/**
* SM单元测试
*
*
* @author looly
*
*/
public class SmTest {
@Test
public void sm3Test() {
String digestHex = SmUtil.sm3("aaaaa");
Assert.assertEquals("136ce3c86e4ed909b76082055a61586af20b4dab674732ebd4b599eef080c9be", digestHex);
}
@Test
public void sm4Test() {
String content = "test中文";
@ -73,7 +73,7 @@ public class SmTest {
String decryptStr = sm4.decryptStr(encryptHex, CharsetUtil.CHARSET_UTF_8);
Assert.assertEquals(content, decryptStr);
}
@Test
public void hmacSm3Test() {
String content = "test中文";