Net.Pkcs11Interop.LowLevelAPI80.Delegates.Initialize C# (CSharp) Method

Initialize() private method

Get delegates from unmanaged function pointers
private Initialize ( CK_FUNCTION_LIST ckFunctionList ) : void
ckFunctionList CK_FUNCTION_LIST Structure which contains cryptoki function pointers
return void
        private void Initialize(CK_FUNCTION_LIST ckFunctionList)
        {
            C_Initialize = UnmanagedLibrary.GetDelegateForFunctionPointer<C_InitializeDelegate>(ckFunctionList.C_Initialize);
            C_Finalize = UnmanagedLibrary.GetDelegateForFunctionPointer<C_FinalizeDelegate>(ckFunctionList.C_Finalize);
            C_GetInfo = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetInfoDelegate>(ckFunctionList.C_GetInfo);
            C_GetFunctionList = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetFunctionListDelegate>(ckFunctionList.C_GetFunctionList);
            C_GetSlotList = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetSlotListDelegate>(ckFunctionList.C_GetSlotList);
            C_GetSlotInfo = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetSlotInfoDelegate>(ckFunctionList.C_GetSlotInfo);
            C_GetTokenInfo = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetTokenInfoDelegate>(ckFunctionList.C_GetTokenInfo);
            C_GetMechanismList = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetMechanismListDelegate>(ckFunctionList.C_GetMechanismList);
            C_GetMechanismInfo = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetMechanismInfoDelegate>(ckFunctionList.C_GetMechanismInfo);
            C_InitToken = UnmanagedLibrary.GetDelegateForFunctionPointer<C_InitTokenDelegate>(ckFunctionList.C_InitToken);
            C_InitPIN = UnmanagedLibrary.GetDelegateForFunctionPointer<C_InitPINDelegate>(ckFunctionList.C_InitPIN);
            C_SetPIN = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SetPINDelegate>(ckFunctionList.C_SetPIN);
            C_OpenSession = UnmanagedLibrary.GetDelegateForFunctionPointer<C_OpenSessionDelegate>(ckFunctionList.C_OpenSession);
            C_CloseSession = UnmanagedLibrary.GetDelegateForFunctionPointer<C_CloseSessionDelegate>(ckFunctionList.C_CloseSession);
            C_CloseAllSessions = UnmanagedLibrary.GetDelegateForFunctionPointer<C_CloseAllSessionsDelegate>(ckFunctionList.C_CloseAllSessions);
            C_GetSessionInfo = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetSessionInfoDelegate>(ckFunctionList.C_GetSessionInfo);
            C_GetOperationState = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetOperationStateDelegate>(ckFunctionList.C_GetOperationState);
            C_SetOperationState = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SetOperationStateDelegate>(ckFunctionList.C_SetOperationState);
            C_Login = UnmanagedLibrary.GetDelegateForFunctionPointer<C_LoginDelegate>(ckFunctionList.C_Login);
            C_Logout = UnmanagedLibrary.GetDelegateForFunctionPointer<C_LogoutDelegate>(ckFunctionList.C_Logout);
            C_CreateObject = UnmanagedLibrary.GetDelegateForFunctionPointer<C_CreateObjectDelegate>(ckFunctionList.C_CreateObject);
            C_CopyObject = UnmanagedLibrary.GetDelegateForFunctionPointer<C_CopyObjectDelegate>(ckFunctionList.C_CopyObject);
            C_DestroyObject = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DestroyObjectDelegate>(ckFunctionList.C_DestroyObject);
            C_GetObjectSize = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetObjectSizeDelegate>(ckFunctionList.C_GetObjectSize);
            C_GetAttributeValue = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetAttributeValueDelegate>(ckFunctionList.C_GetAttributeValue);
            C_SetAttributeValue = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SetAttributeValueDelegate>(ckFunctionList.C_SetAttributeValue);
            C_FindObjectsInit = UnmanagedLibrary.GetDelegateForFunctionPointer<C_FindObjectsInitDelegate>(ckFunctionList.C_FindObjectsInit);
            C_FindObjects = UnmanagedLibrary.GetDelegateForFunctionPointer<C_FindObjectsDelegate>(ckFunctionList.C_FindObjects);
            C_FindObjectsFinal = UnmanagedLibrary.GetDelegateForFunctionPointer<C_FindObjectsFinalDelegate>(ckFunctionList.C_FindObjectsFinal);
            C_EncryptInit = UnmanagedLibrary.GetDelegateForFunctionPointer<C_EncryptInitDelegate>(ckFunctionList.C_EncryptInit);
            C_Encrypt = UnmanagedLibrary.GetDelegateForFunctionPointer<C_EncryptDelegate>(ckFunctionList.C_Encrypt);
            C_EncryptUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_EncryptUpdateDelegate>(ckFunctionList.C_EncryptUpdate);
            C_EncryptFinal = UnmanagedLibrary.GetDelegateForFunctionPointer<C_EncryptFinalDelegate>(ckFunctionList.C_EncryptFinal);
            C_DecryptInit = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DecryptInitDelegate>(ckFunctionList.C_DecryptInit);
            C_Decrypt = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DecryptDelegate>(ckFunctionList.C_Decrypt);
            C_DecryptUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DecryptUpdateDelegate>(ckFunctionList.C_DecryptUpdate);
            C_DecryptFinal = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DecryptFinalDelegate>(ckFunctionList.C_DecryptFinal);
            C_DigestInit = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DigestInitDelegate>(ckFunctionList.C_DigestInit);
            C_Digest = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DigestDelegate>(ckFunctionList.C_Digest);
            C_DigestUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DigestUpdateDelegate>(ckFunctionList.C_DigestUpdate);
            C_DigestKey = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DigestKeyDelegate>(ckFunctionList.C_DigestKey);
            C_DigestFinal = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DigestFinalDelegate>(ckFunctionList.C_DigestFinal);
            C_SignInit = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SignInitDelegate>(ckFunctionList.C_SignInit);
            C_Sign = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SignDelegate>(ckFunctionList.C_Sign);
            C_SignUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SignUpdateDelegate>(ckFunctionList.C_SignUpdate);
            C_SignFinal = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SignFinalDelegate>(ckFunctionList.C_SignFinal);
            C_SignRecoverInit = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SignRecoverInitDelegate>(ckFunctionList.C_SignRecoverInit);
            C_SignRecover = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SignRecoverDelegate>(ckFunctionList.C_SignRecover);
            C_VerifyInit = UnmanagedLibrary.GetDelegateForFunctionPointer<C_VerifyInitDelegate>(ckFunctionList.C_VerifyInit);
            C_Verify = UnmanagedLibrary.GetDelegateForFunctionPointer<C_VerifyDelegate>(ckFunctionList.C_Verify);
            C_VerifyUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_VerifyUpdateDelegate>(ckFunctionList.C_VerifyUpdate);
            C_VerifyFinal = UnmanagedLibrary.GetDelegateForFunctionPointer<C_VerifyFinalDelegate>(ckFunctionList.C_VerifyFinal);
            C_VerifyRecoverInit = UnmanagedLibrary.GetDelegateForFunctionPointer<C_VerifyRecoverInitDelegate>(ckFunctionList.C_VerifyRecoverInit);
            C_VerifyRecover = UnmanagedLibrary.GetDelegateForFunctionPointer<C_VerifyRecoverDelegate>(ckFunctionList.C_VerifyRecover);
            C_DigestEncryptUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DigestEncryptUpdateDelegate>(ckFunctionList.C_DigestEncryptUpdate);
            C_DecryptDigestUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DecryptDigestUpdateDelegate>(ckFunctionList.C_DecryptDigestUpdate);
            C_SignEncryptUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SignEncryptUpdateDelegate>(ckFunctionList.C_SignEncryptUpdate);
            C_DecryptVerifyUpdate = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DecryptVerifyUpdateDelegate>(ckFunctionList.C_DecryptVerifyUpdate);
            C_GenerateKey = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GenerateKeyDelegate>(ckFunctionList.C_GenerateKey);
            C_GenerateKeyPair = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GenerateKeyPairDelegate>(ckFunctionList.C_GenerateKeyPair);
            C_WrapKey = UnmanagedLibrary.GetDelegateForFunctionPointer<C_WrapKeyDelegate>(ckFunctionList.C_WrapKey);
            C_UnwrapKey = UnmanagedLibrary.GetDelegateForFunctionPointer<C_UnwrapKeyDelegate>(ckFunctionList.C_UnwrapKey);
            C_DeriveKey = UnmanagedLibrary.GetDelegateForFunctionPointer<C_DeriveKeyDelegate>(ckFunctionList.C_DeriveKey);
            C_SeedRandom = UnmanagedLibrary.GetDelegateForFunctionPointer<C_SeedRandomDelegate>(ckFunctionList.C_SeedRandom);
            C_GenerateRandom = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GenerateRandomDelegate>(ckFunctionList.C_GenerateRandom);
            C_GetFunctionStatus = UnmanagedLibrary.GetDelegateForFunctionPointer<C_GetFunctionStatusDelegate>(ckFunctionList.C_GetFunctionStatus);
            C_CancelFunction = UnmanagedLibrary.GetDelegateForFunctionPointer<C_CancelFunctionDelegate>(ckFunctionList.C_CancelFunction);
            C_WaitForSlotEvent = UnmanagedLibrary.GetDelegateForFunctionPointer<C_WaitForSlotEventDelegate>(ckFunctionList.C_WaitForSlotEvent);
        }
    }