简化引用
This commit is contained in:
@@ -3,14 +3,12 @@ package com.sunyard.sydapi.test;
|
||||
import com.sunyard.RetWrap;
|
||||
import com.sunyard.SydApi;
|
||||
import com.sunyard.proto.Util;
|
||||
import com.sunyard.util.SYMUtil;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import racal.sunyard.main.SydApi4j;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Base64;
|
||||
|
||||
import static com.sunyard.sydapi.util.PrintUtil.printByteArray;
|
||||
import static com.sunyard.sydapi.util.PrintUtil.printRetWrap;
|
||||
@@ -131,7 +129,7 @@ public class ABCNorthBranch {
|
||||
String s = api.SM2SignC(1, SM2PrivateKeyTag, Util.hexString2Bytes(SM2PublicKey), thisOrgData.getBytes());
|
||||
|
||||
System.out.println(s);
|
||||
boolean b = api.SM2Verify( Util.hexString2Bytes(SM2PublicKey), thisOrgData.getBytes(), s);
|
||||
boolean b = api.SM2Verify(Util.hexString2Bytes(SM2PublicKey), thisOrgData.getBytes(), s);
|
||||
System.out.println(b);
|
||||
}
|
||||
|
||||
@@ -140,7 +138,7 @@ public class ABCNorthBranch {
|
||||
@Test
|
||||
public void testSM4EncryptDataCBC() {
|
||||
String msg = "1111111111111111111111";
|
||||
byte[] bytes = api.SM4EncryptDataCBC(0, SM4Key, 0, 0 , msg.getBytes());
|
||||
byte[] bytes = api.SM4EncryptDataCBC(0, SM4Key, 0, 0, msg.getBytes());
|
||||
printByteArray(bytes);
|
||||
|
||||
}
|
||||
@@ -150,7 +148,7 @@ public class ABCNorthBranch {
|
||||
@Test
|
||||
public void testSM4DecryptDataCBC() {
|
||||
String msg = "11111111111";
|
||||
byte[] bytes = api.SM4EncryptDataCBC(0, SM4Key, 0, 0 , msg.getBytes());
|
||||
byte[] bytes = api.SM4EncryptDataCBC(0, SM4Key, 0, 0, msg.getBytes());
|
||||
|
||||
byte[] bytes1 = api.SM4DecryptDataCBC(0, SM4Key, 0, 0, bytes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user