package com.pheox.jcapi.test;
import com.pheox.jcapi.CoreSignatureJNI;
import com.pheox.jcapi.CoreUtilJNI;
import com.pheox.jcapi.JCAPIJNIException;
public class getcsp {
public static void main(String[] args) {
// String g = "MIIDrTCCA2ugAwIBAgICAeYwCwYHKoZIzjgEAwUAMIGQMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEjAQBgNVBAcTCVBhbG8gQWx0bzEdMBsGA1UEChMUU3VuIE1pY3Jvc3lzdGVtcyBJbmMxIzAhBgNVBAsTGkphdmEgU29mdHdhcmUgQ29kZSBTaWduaW5nMRwwGgYDVQQDExNKQ0UgQ29kZSBTaWduaW5nIENBMB4XDTA1MDEyMTIyNDc1MloXDTEwMDEyNTIyNDc1MlowVDEdMBsGA1UEChMUU3VuIE1pY3Jvc3lzdGVtcyBJbmMxIzAhBgNVBAsTGkphdmEgU29mdHdhcmUgQ29kZSBTaWduaW5nMQ4wDAYDVQQDEwVQaGVveDCCAbgwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GFAAKBgQD2cHtWHnwO9pOZx9H0uUoLZGKE3iwvVAkUwzVqVEgT4fMG70icn2dII/RABPtXW6Zai87iIg7zC975qeeEznBee7ll/8HFFe8H4IL3tPCf+/TigELMORl3ySd8lzD1mEZMYUL6Rc16T3ZJ3iUxfrJJiN815SZ8qrDkHAtS1Hhot6OBjTCBijARBglghkgBhvhCAQEEBAMCBBAwDgYDVR0PAQH/BAQDAgXgMB0GA1UdDgQWBBRkqtvyzwWOJd+aZikkKKFLDTaqbDAfBgNVHSMEGDAWgBRl4vSGydNO8JFOWKJq9dh4WprBpjAlBgNVHREEHjAcgRp0b21teS5ncmFuZGVmb3JzQHBoZW94LmNvbTALBgcqhkjOOAQDBQADLwAwLAIUdTerIDsy5CLjjPffwoO4rYWZ4kECFAyrKdfe2Qj5T5MWse9EhMD951Wt";
try {
System.loadLibrary("JCAPI");
System.out.println("Load Library Successfully!");
} catch(UnsatisfiedLinkError e) {
e.printStackTrace();
}
CoreUtilJNI core=new CoreUtilJNI();
String[] mscsp=core.getMSCSP();
for(int i=0;i<mscsp.length;i++)
System.out.println(mscsp[i]);
System.out.println("done");
String content="1234567890abcdefghij+sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss";
byte[] data = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
data=content.getBytes();
try
{
int[] d= CoreSignatureJNI.hashInit("SHA1");
CoreSignatureJNI.hashUpdate(d, data);
byte abyte1[] = CoreSignatureJNI.hashFinal(d);
System.out.println(""+new String(abyte1));
return;
}
catch(JCAPIJNIException jcapijniexception)
{
jcapijniexception.printStackTrace();
}
}
}