测试代码整理
This commit is contained in:
@@ -18,9 +18,9 @@ public class SignatureVerifyTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
System.setProperty("com.sunyard.sydapi4j.debug", "true");
|
||||
this.api = (SydApi4j) new SydApi4j().connect("192.168.21.166", 8889, null, 2000);
|
||||
this.api = (SydApi4j) new SydApi4j().connect("172.1.41.139", 8889, null, 3000);
|
||||
this.orgData = "Hello, World! 测试数据".getBytes();
|
||||
this.SM2dn = "C=CN,ST=北京,L=北京,O=信雅达,CN=172.1.40.188";
|
||||
this.SM2dn = "C=cn,O=CFCA OCA1 SM2,OU=Local RA OCA1,OU=Units,CN=041@N91330108762038374D@sunyard@00000064";
|
||||
}
|
||||
|
||||
@After
|
||||
@@ -71,7 +71,7 @@ public class SignatureVerifyTest {
|
||||
|
||||
byte[] cipherKey = (byte[]) genResult.get(SydApi.RET_CIPHER_KEY);
|
||||
Assert.assertNotNull("数字信封密文密钥不应为空", cipherKey);
|
||||
System.out.println("数字信封密文密钥: " + new String(cipherKey));
|
||||
System.out.println("数字信封密文: " + new String(cipherKey));
|
||||
|
||||
RetWrap decryptResult = this.api.decryptDEByDN(SM2dn, cipherKey);
|
||||
Assert.assertNotNull("数字信封解密结果不应为空", decryptResult);
|
||||
|
||||
Reference in New Issue
Block a user