mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix test
This commit is contained in:
@@ -14,18 +14,18 @@ import javax.crypto.SecretKey;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SM单元测试
|
* SM单元测试
|
||||||
*
|
*
|
||||||
* @author looly
|
* @author looly
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SmTest {
|
public class SmTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void sm3Test() {
|
public void sm3Test() {
|
||||||
String digestHex = SmUtil.sm3("aaaaa");
|
String digestHex = SmUtil.sm3("aaaaa");
|
||||||
Assert.assertEquals("136ce3c86e4ed909b76082055a61586af20b4dab674732ebd4b599eef080c9be", digestHex);
|
Assert.assertEquals("136ce3c86e4ed909b76082055a61586af20b4dab674732ebd4b599eef080c9be", digestHex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void sm4Test() {
|
public void sm4Test() {
|
||||||
String content = "test中文";
|
String content = "test中文";
|
||||||
@@ -73,7 +73,7 @@ public class SmTest {
|
|||||||
String decryptStr = sm4.decryptStr(encryptHex, CharsetUtil.CHARSET_UTF_8);
|
String decryptStr = sm4.decryptStr(encryptHex, CharsetUtil.CHARSET_UTF_8);
|
||||||
Assert.assertEquals(content, decryptStr);
|
Assert.assertEquals(content, decryptStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void hmacSm3Test() {
|
public void hmacSm3Test() {
|
||||||
String content = "test中文";
|
String content = "test中文";
|
||||||
|
Reference in New Issue
Block a user