修改中文乱码,测试接口
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user