修改中文乱码,测试接口

This commit is contained in:
zhoubin
2021-10-18 17:22:14 +08:00
parent 0029fa1c26
commit b65f76aab8
5 changed files with 25 additions and 8 deletions
@@ -7,6 +7,8 @@ import org.junit.Before;
import org.junit.Test;
import racal.sunyard.main.SydApi4j;
import java.io.UnsupportedEncodingException;
import static com.sunyard.sydapi.util.PrintUtil.printByteArray;
import static com.sunyard.sydapi.util.PrintUtil.printRetWrap;
@@ -146,7 +148,7 @@ public class ABCNorthBranch {
// 测试通过
// E0
@Test
public void testSM4DecryptFileDataCBC() {
public void testSM4DecryptFileDataCBC() throws UnsupportedEncodingException {
String outFilePath = "C:\\Users\\edgar\\Desktop\\fsdownload\\test\\in2.txt";
String outFilePath2 = "C:\\Users\\edgar\\Desktop\\fsdownload\\test\\out1.txt";
@@ -663,7 +663,7 @@ public class TestAllMethods {
// 测试通过
// E0
@Test
public void testSM4DecryptFileDataCBC() {
public void testSM4DecryptFileDataCBC() throws UnsupportedEncodingException {
String key = "X6CEE744329499B426CEE744329499B42";
String outFilePath = "C:\\Users\\edgar\\Desktop\\fsdownload\\test\\in2.txt";
String outFilePath2 = "C:\\Users\\edgar\\Desktop\\fsdownload\\test\\out1.txt";
@@ -671,6 +671,19 @@ public class TestAllMethods {
System.out.println(b);
}
@Test
public void testaaa() throws UnsupportedEncodingException {
String key = "X6CEE744329499B426CEE744329499B42";
String inFilePath = "C:\\Users\\edgar\\Desktop\\fsdownload\\test\\in1.txt";
String outFilePath = "C:\\Users\\edgar\\Desktop\\fsdownload\\test\\in2.txt";
String outFilePath2 = "C:\\Users\\edgar\\Desktop\\fsdownload\\test\\out1.txt";
boolean b = api.SM4EncryptFileDataCBC(0, key, 0, 0, inFilePath, outFilePath);
System.out.println(b);
boolean c = api.SM4DecryptFileDataCBC(0, key, 0, 0, outFilePath, outFilePath2);
System.out.println(c);
}
// 测试通过
// Y0
@Test