hash
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package sample;
|
||||
|
||||
import com.sunyard.SydApi;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import racal.sunyard.main.SydApi4j;
|
||||
|
||||
public class HashTest {
|
||||
|
||||
private static final String ip = "172.16.17.161";
|
||||
private SydApi api;
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
System.setProperty("com.sunyard.sydapi4j.debug", "true");
|
||||
api = new SydApi4j().connect(ip, 8889, null, 5000);
|
||||
}
|
||||
|
||||
@After
|
||||
public void after() {
|
||||
if (null != api) {
|
||||
api.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void md5(){
|
||||
api.itHash( 2, new byte[ 5 * 1024 * 1024 ]);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void sha1(){
|
||||
api.itHash( 0, new byte[ 5 * 1024 * 1024 ]);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sha256(){
|
||||
api.itHash( 1, new byte[ 5 * 1024 * 1024 ]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user