com.dyadicsec.pkcs11.Library Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unbound-java-provider Show documentation
Show all versions of unbound-java-provider Show documentation
This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi
package com.dyadicsec.pkcs11;
/**
* Created by valery.osheter on 18-Apr-16.
*/
public final class Library
{
static
{
System.loadLibrary("ekmpkcs11_jni");
}
public static int rvErr(long result)
{
return (int)result;
}
public static int rvValue(long result)
{
return (int)(result >> 32);
}
public static native int C_Initialize();
public static native int C_Finalize();
public static native int C_GetInfo(CK_INFO info);
public static native long C_GetSlotList(boolean present, int[] list);
public static native int C_GetSlotInfo(int slotID, CK_SLOT_INFO info);
public static native int C_GetTokenInfo(int slotID, CK_TOKEN_INFO info);
public static native long C_GetMechanismList(int slotID, int[] list);
public static native int C_GetMechanismInfo(int slotID, int type, CK_MECHANISM_INFO info);
public static native long C_OpenSession(int slotID, int flags);
public static native int C_CloseAllSessions(int slotID);
}