All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dyadicsec.pkcs11.Library Maven / Gradle / Ivy

Go to download

This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi

There is a newer version: 42761
Show newest version
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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy