loadrunner

This commit is contained in:
cheney 2022-05-18 16:46:48 +08:00
parent ca47ba3abc
commit 05489bfdf7
2 changed files with 30 additions and 25 deletions

View File

@ -6,32 +6,35 @@ import racal.sunyard.main.SydApiBuilder;
public class ShangTest {
private static final String dn = "C=CN,O=CFCA OCA1,OU=YCCA,OU=Individual-2,CN=YCCA@黄金交易所@Zhuangj@1";
private static final byte[] testData = new byte[ 4 * 1024 ];
private SydApi4j api = null;
public void init() throws ClassNotFoundException, IllegalAccessException, InstantiationException {
api = (SydApi4j) new SydApiBuilder()
.setIp("172.16.18.59")
.setPort( 8889 )
.useDebugMode()
.build();
public void init() throws Exception {
if ( null == api ) {
api = (SydApi4j) new SydApiBuilder()
.setIp("172.16.18.59") // 192.168.0.162
.setPort( 8889 )
.useDebugMode()
.build();
}
}
public void action(){
String sign = api.attachedSign(testData, dn);
boolean ret = api.attachedVerify( sign );
assert ret;
sign = api.SYD_DetachedSign(testData, dn);
ret = api.SYD_DetachedVerify( testData, sign );
assert ret;
public void hash4(){
api.SM3Hash( testData );
}
public void fun1(){
// byte[] sign = api.attachedSign();
}
public void destroy(){
public void end(){
if (null != this.api ) {
this.api.disconnect();
}
@ -39,11 +42,10 @@ public class ShangTest {
public static void main(String[] args) throws Throwable {
System.out.println( SydApi4j.getVersion() );
Actions test = new Actions();
// Actions test = new Actions();
ShangTest test = new ShangTest();
test.init();
test.action();
test.end();

View File

@ -17,11 +17,14 @@ public class Actions
private SydApi4j api = null;
public int init() throws Throwable {
api = (SydApi4j) new SydApiBuilder()
.setIp("172.16.18.59")
.setPort( 8889 )
.useDebugMode()
.build();
if ( null == api ) {
api = (SydApi4j) new SydApiBuilder()
.setIp("172.16.18.59")
.setPort( 8889 )
.useDebugMode()
.build();
}
return 0;
}//end of init