测试文件修改

This commit is contained in:
junj2.liang
2022-09-05 11:26:47 +08:00
parent 602781686b
commit d2aaa8e9ac
7 changed files with 21 additions and 76 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ public class Sample
// 通常单例就够了
SydApiBuilder builder = new SydApiBuilder(
new String[]{ "192.168.0.200" },
new String[]{ "192.168.1.128" },
new int[]{ 8889 },
10,
15
+6 -5
View File
@@ -115,7 +115,7 @@ public class LongDataTest {
@Test
public void case5() {
SydApiSM423 sydApiSM4 = api.initSM4(1, 1);
SydApiSM4 sydApiSM4 = api.initSM4(1, 1);
byte[] enData = sydApiSM4.finish();
System.out.println(Util.bytes2HexString(enData));
Assert.assertArrayEquals(Util.hexString2Bytes("FF49F76AD3A71651FE1A8A9F0D2A689E"), enData);
@@ -123,7 +123,7 @@ public class LongDataTest {
@Test
public void case6() {
SydApiSM423 sydApiSM4 = api.initSM4(1, 1);
SydApiSM4 sydApiSM4 = api.initSM4(1, 1);
for (int i = 0; i < 10; i++) {
int lucky = new Random().nextInt(4065);
@@ -144,8 +144,8 @@ public class LongDataTest {
int max = 1000;
int size = 4065;
SydApiSM423 en = api.initSM4(1, 1);
SydApiSM423 de = api.initSM4(1, 0);
SydApiSM4 en = api.initSM4(1, 1);
SydApiSM4 de = api.initSM4(1, 0);
ByteBuffer inData = ByteBuffer.allocate(max * size);
ByteBuffer enData = ByteBuffer.allocate(max * size + 16);
@@ -215,4 +215,5 @@ public class LongDataTest {
Assert.assertArrayEquals(deData.array(), inData.array());
}
}
}