public class CryptokiEx
extends java.lang.Object
Cryptoki
class.
The feature added by this class is that after invoking the Cryptoki method,
if an error is detected then a CKR_Exception
exception object is thrown.Modifier and Type | Method and Description |
---|---|
static CK_RV |
C_CancelFunction(CK_SESSION_HANDLE hSession) |
static CK_RV |
C_CloseAllSessions(long slotID) |
static CK_RV |
C_CloseSession(CK_SESSION_HANDLE hSession) |
static CK_RV |
C_CopyObject(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject,
CK_ATTRIBUTE[] template,
long attributeCount,
CK_OBJECT_HANDLE hNewObject) |
static CK_RV |
C_CreateObject(CK_SESSION_HANDLE hSession,
CK_ATTRIBUTE[] template,
long attributeCount,
CK_OBJECT_HANDLE hObject) |
static CK_RV |
C_Decrypt(CK_SESSION_HANDLE hSession,
byte[] encryptedData,
long encryptedDataLen,
byte[] data,
LongRef dataLen) |
static CK_RV |
C_DecryptDigestUpdate(CK_SESSION_HANDLE hSession,
byte[] encryptedPart,
long encryptedPartLen,
byte[] part,
LongRef partLen) |
static CK_RV |
C_DecryptFinal(CK_SESSION_HANDLE hSession,
byte[] lastPart,
LongRef lastPartLen) |
static CK_RV |
C_DecryptFinal(CK_SESSION_HANDLE hSession,
CK_MECHANISM mech,
byte[] lastPart,
LongRef lastPartLen) |
static CK_RV |
C_DecryptInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_DecryptUpdate(CK_SESSION_HANDLE hSession,
byte[] encryptedPart,
long encryptedPartLen,
byte[] part,
LongRef partLen) |
static CK_RV |
C_DecryptUpdate(CK_SESSION_HANDLE hSession,
CK_MECHANISM mech,
byte[] encryptedPart,
long encryptedPartLen,
byte[] part,
LongRef partLen) |
static CK_RV |
C_DecryptVerifyUpdate(CK_SESSION_HANDLE hSession,
byte[] encryptedPart,
long encryptedPartLen,
byte[] part,
LongRef partLen) |
static CK_RV |
C_DeriveKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hBaseKey,
CK_ATTRIBUTE[] template,
long attributeCount,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_DestroyObject(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject) |
static CK_RV |
C_Digest(CK_SESSION_HANDLE hSession,
byte[] data,
long dataLen,
byte[] digest,
LongRef digestLen) |
static CK_RV |
C_DigestEncryptUpdate(CK_SESSION_HANDLE hSession,
byte[] part,
long partLen,
byte[] encryptedPart,
LongRef encryptedPartLen) |
static CK_RV |
C_DigestFinal(CK_SESSION_HANDLE hSession,
byte[] digest,
LongRef digestLen) |
static CK_RV |
C_DigestInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism) |
static CK_RV |
C_DigestKey(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_DigestUpdate(CK_SESSION_HANDLE hSession,
byte[] part,
long partLen) |
static CK_RV |
C_Encrypt(CK_SESSION_HANDLE hSession,
byte[] data,
long dataLen,
byte[] encryptedData,
LongRef encryptedDataLen) |
static CK_RV |
C_EncryptFinal(CK_SESSION_HANDLE hSession,
byte[] lastEncryptedPart,
LongRef lastEncryptedPartLen) |
static CK_RV |
C_EncryptFinal(CK_SESSION_HANDLE hSession,
CK_MECHANISM mech,
byte[] lastEncryptedPart,
LongRef lastEncryptedPartLen) |
static CK_RV |
C_EncryptInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_EncryptUpdate(CK_SESSION_HANDLE hSession,
byte[] part,
long partLen,
byte[] encryptedPart,
LongRef encryptedPartLen) |
static CK_RV |
C_EncryptUpdate(CK_SESSION_HANDLE hSession,
CK_MECHANISM mech,
byte[] part,
long partLen,
byte[] encryptedPart,
LongRef encryptedPartLen) |
static CK_RV |
C_Finalize(java.lang.Object reserved) |
static CK_RV |
C_FindObjects(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE[] hObjects,
long maxObjectCount,
LongRef objectCount) |
static CK_RV |
C_FindObjectsFinal(CK_SESSION_HANDLE hSession) |
static CK_RV |
C_FindObjectsInit(CK_SESSION_HANDLE hSession,
CK_ATTRIBUTE[] template,
long attributeCount) |
static CK_RV |
C_GenerateKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_ATTRIBUTE[] template,
long attributeCount,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_GenerateKeyPair(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_ATTRIBUTE[] publicKeyTemplate,
long publicKeyAttributeCount,
CK_ATTRIBUTE[] privateKeyTemplate,
long privateKeyAttributeCount,
CK_OBJECT_HANDLE hPublicKey,
CK_OBJECT_HANDLE hPrivateKey) |
static CK_RV |
C_GenerateRandom(CK_SESSION_HANDLE hSession,
byte[] randomData,
long randomLen) |
static CK_RV |
C_GetAttributeValue(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject,
CK_ATTRIBUTE[] template,
long attributeCount) |
static CK_RV |
C_GetFunctionStatus(CK_SESSION_HANDLE hSession) |
static CK_RV |
C_GetInfo(CK_INFO info) |
static CK_RV |
C_GetMechanismInfo(long slotID,
CK_MECHANISM_TYPE type,
CK_MECHANISM_INFO info) |
static CK_RV |
C_GetMechanismList(long slotID,
CK_MECHANISM_TYPE[] mechanismList,
LongRef count) |
static CK_RV |
C_GetObjectSize(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject,
LongRef size) |
static CK_RV |
C_GetOperationState(CK_SESSION_HANDLE hSession,
byte[] operationState,
LongRef operationStateLen) |
static CK_RV |
C_GetSessionInfo(CK_SESSION_HANDLE hSession,
CK_SESSION_INFO info) |
static CK_RV |
C_GetSlotInfo(long slotID,
CK_SLOT_INFO info) |
static CK_RV |
C_GetSlotList(CK_BBOOL tokenPresent,
long[] slotList,
LongRef count) |
static CK_RV |
C_GetTokenInfo(long slotID,
CK_TOKEN_INFO info) |
static CK_RV |
C_Initialize(CK_C_INITIALIZE_ARGS initArgs) |
static CK_RV |
C_InitPIN(CK_SESSION_HANDLE hSession,
byte[] pin,
long pinLen) |
static CK_RV |
C_InitToken(long slotID,
byte[] pin,
long pinLen,
byte[] label) |
static CK_RV |
C_Login(CK_SESSION_HANDLE hSession,
CK_USER_TYPE userType,
byte[] pin,
long pinLen) |
static CK_RV |
C_Logout(CK_SESSION_HANDLE hSession) |
static CK_RV |
C_OpenSession(long slotID,
long flags,
java.lang.Object pApplication,
java.lang.Object notifyUnsupported,
CK_SESSION_HANDLE hSession) |
static CK_RV |
C_SeedRandom(CK_SESSION_HANDLE hSession,
byte[] seed,
long seedLen) |
static CK_RV |
C_SetAttributeValue(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject,
CK_ATTRIBUTE[] template,
long attributeCount) |
static CK_RV |
C_SetOperationState(CK_SESSION_HANDLE hSession,
byte[] operationState,
long operationStateLen,
CK_OBJECT_HANDLE hEncryptionKey,
CK_OBJECT_HANDLE hAuthenticationKey) |
static CK_RV |
C_SetPIN(CK_SESSION_HANDLE hSession,
byte[] oldPin,
long oldLen,
byte[] newPin,
long newLen) |
static CK_RV |
C_Sign(CK_SESSION_HANDLE hSession,
byte[] data,
long dataLen,
byte[] signature,
LongRef signatureLen) |
static CK_RV |
C_SignEncryptUpdate(CK_SESSION_HANDLE hSession,
byte[] part,
long partLen,
byte[] encryptedPart,
LongRef encryptedPartLen) |
static CK_RV |
C_SignFinal(CK_SESSION_HANDLE hSession,
byte[] signature,
LongRef signatureLen) |
static CK_RV |
C_SignInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_SignRecover(CK_SESSION_HANDLE hSession,
byte[] data,
long dataLen,
byte[] signature,
LongRef signatureLen) |
static CK_RV |
C_SignRecoverInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_SignUpdate(CK_SESSION_HANDLE hSession,
byte[] part,
long partLen) |
static CK_RV |
C_UnwrapKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hUnwrappingKey,
byte[] wrappedKey,
long wrappedKeyLen,
CK_ATTRIBUTE[] template,
long attributeCount,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_Verify(CK_SESSION_HANDLE hSession,
byte[] data,
long dataLen,
byte[] signature,
long signatureLen) |
static CK_RV |
C_VerifyFinal(CK_SESSION_HANDLE hSession,
byte[] signature,
long signatureLen) |
static CK_RV |
C_VerifyInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_VerifyRecover(CK_SESSION_HANDLE hSession,
byte[] signature,
long signatureLen,
byte[] data,
LongRef dataLen) |
static CK_RV |
C_VerifyRecoverInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hKey) |
static CK_RV |
C_VerifyUpdate(CK_SESSION_HANDLE hSession,
byte[] part,
long partLen) |
static CK_RV |
C_WaitForSlotEvent(long flags,
LongRef slot,
java.lang.Object reserved) |
static CK_RV |
C_WrapKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hWrappingKey,
CK_OBJECT_HANDLE hKey,
byte[] wrappedKey,
LongRef wrappedKeyLen) |
static CK_RV |
CA_AssignKey(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey)
Assign a key.to prevent authentication data from being reset
|
static CK_RV |
CA_AuthorizeKey(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey,
byte[] authData)
Authorize a key for PKA(Per Key Authentication).
|
static CK_RV |
CA_Bip32ExportPublicKey(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey,
byte[] key)
Exports the Hierarchical Deterministic public key in Base58-encoded format.
|
static CK_RV |
CA_Bip32ImportPublicKey(CK_SESSION_HANDLE hSession,
byte[] key,
CK_OBJECT_HANDLE hKey)
Imports the Hierarchical Deterministic public key in Base58-encoded format.
|
static CK_RV |
CA_CloneAsSource(CK_SESSION_HANDLE sourceSession,
long sourceObjectType,
CK_OBJECT_HANDLE sourceObjectHandle,
byte[] inputeBLob,
LongRef inputBlobSize,
boolean replicate,
byte[] outputBlob,
LongRef outputBlobLen)
Perform clone as source
|
static CK_RV |
CA_CloneAsSourceInit(CK_SESSION_HANDLE sourceSession,
byte[] dummy,
LongRef dummySize,
byte[] outputBlob,
LongRef outputBlobLen,
boolean replicate)
Perform clone as source init
|
static CK_RV |
CA_CloneAsTarget(CK_SESSION_HANDLE targetSession,
byte[] dummy,
LongRef dummySize,
byte[] inputeBlob,
LongRef inputBlobSize,
long sourceObjectType,
CK_OBJECT_HANDLE sourceObjectHandle,
boolean replicate,
CK_OBJECT_HANDLE clonedObjectHandle)
Perform clone as target
|
static CK_RV |
CA_CloneAsTargetInit(CK_SESSION_HANDLE targetSession,
byte[] inputBlob,
LongRef inputBlobSize,
byte[] dummy,
LongRef dummySize,
boolean replicate,
byte[] outputBlob,
LongRef outputBlobLen)
Perform clone as target init
|
static CK_RV |
CA_CloneObject(CK_SESSION_HANDLE targetSession,
CK_SESSION_HANDLE sourceSession,
long objectType,
CK_OBJECT_HANDLE objectHandle,
CK_OBJECT_HANDLE clonedObjectHandle)
Perform clone object
|
static CK_RV |
CA_CloseApplicationID(long SlotID,
long ulHigh,
long ulLow) |
static CK_RV |
CA_DeriveKeyAndWrap(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
CK_OBJECT_HANDLE hBaseKey,
CK_ATTRIBUTE[] template,
long attributeCount,
CK_MECHANISM mechanismWrap,
CK_OBJECT_HANDLE hWrappingKey,
byte[] wrappedKey,
LongRef wrappedKeyLen) |
static CK_RV |
CA_EncodeEdwardsPrivateKey(byte[] curveParams,
byte[] key,
byte[] encKey,
LongRef encKeyLen)
Encode the Edwards EC private key in PKCS8 format.
|
static CK_RV |
CA_EncodeEdwardsPublicKey(byte[] key,
byte[] encKey,
LongRef encKeyLen)
Encode the Edwards EC public key in PKCS8 format.
|
static CK_RV |
CA_GetFirmwareVersion(long slotID,
LongRef major,
LongRef minor,
LongRef subminor) |
static CK_RV |
CA_GetHSMPolicySetting(long slotId,
HsmPolicy policy,
LongRef policyValue) |
static CK_RV |
CA_GetTokenCertificates(long slotID,
long attributeType,
byte[] attributeValue,
LongRef attributeValueLen) |
static CK_RV |
CA_HAAnswerLoginChallenge(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hLoginPrivateKey,
byte[] pChallengeBlob,
long ulChallengeBlobLen,
byte[] pEncryptedPin,
LongRef pulEncryptedPinLen) |
static CK_RV |
CA_HAGetLoginChallenge(CK_SESSION_HANDLE hSession,
CK_USER_TYPE userType,
byte[] pCertificate,
long ulCertificateLen,
byte[] pChallengeBlob,
LongRef pulChallengeBlobLen) |
static CK_RV |
CA_HAGetMasterPublic_V1_1(CK_SESSION_HANDLE session,
byte[] masterPublicData,
LongRef masterPublicDataLen) |
static CK_RV |
CA_HAGetMasterPublic(long slotId,
byte[] pCertificate,
LongRef pulCertificate) |
static CK_RV |
CA_HAGetMasterPublicData(CK_SESSION_HANDLE session,
CK_OBJECT_HANDLE privateKey,
byte[] masterPublicData,
LongRef masterPublicDataLen) |
static CK_RV |
CA_HAInit(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hLoginPrivateKey) |
static CK_RV |
CA_HAInitExtended(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hLoginPrivateKey,
byte[] loginPrivateKeyPKC,
long loginPrivateKeyPKCLen,
int[] userTypes,
int[] tokenTypes,
long numberOfRole) |
static CK_RV |
CA_HALogin(CK_SESSION_HANDLE hSession,
byte[] pEncryptedPin,
long ulEncryptedPinLen,
byte[] pMofNBlob,
LongRef pulMofNBlobLen) |
static CK_RV |
CA_IncrementFailedAuthCount(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey)
Increment the failed authentication count for a key
(to keep key data in sync across HSMs)
|
static CK_RV |
CA_OpenApplicationID(long SlotID,
long ulHigh,
long ulLow) |
static CK_RV |
CA_ResetAuthorizationData(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey,
byte[] authData)
Reset authentication data for a key.
|
static CK_RV |
CA_SetApplicationID(long ulHigh,
long ulLow) |
static CK_RV |
CA_SetAuthorizationData(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey,
byte[] oldAuthData,
byte[] newAuthData)
Change authentication data for a key.
|
static CK_RV |
CA_SIMExtract(CK_SESSION_HANDLE hSession,
long handleCount,
CK_OBJECT_HANDLE[] objectHandles,
long authSecretCount,
long authSubsetCount,
long authForm,
int[] authSecretSizes,
byte[][] authSecretList,
boolean deleteAfterExtract,
LongRef blobLen,
byte[] blob)
Insert the key blob into the HSM.
|
static CK_RV |
CA_SIMInsert(CK_SESSION_HANDLE hSession,
long authSubsetCount,
long authForm,
int[] authSecretSizes,
byte[][] authSecretList,
long blobLen,
byte[] blob,
LongRef handleCount,
CK_OBJECT_HANDLE[] handles)
Insert the key blob into the HSM.
|
static CK_RV |
CA_SIMMultiSign(CK_SESSION_HANDLE hSession,
CK_MECHANISM mechanism,
long authSubsetCount,
long authForm,
int[] authSecretSizes,
byte[][] authSecretList,
long blobLen,
byte[] blob,
long dataCount,
int[] dataLens,
byte[][] datas,
LongRef[] signatureLens,
byte[][] signatures)
Perform an SKS SIMInsert and multiple signatures in one API call.
|
static CK_RV |
CA_SMKRollover(CK_SESSION_HANDLE session,
long value)
Perform SMK rollover
|
public static CK_RV C_Initialize(CK_C_INITIALIZE_ARGS initArgs) throws CKR_Exception
public static CK_RV C_Finalize(java.lang.Object reserved) throws CKR_Exception
CKR_Exception
Cryptoki.C_Finalize(java.lang.Object)
public static CK_RV C_GetInfo(CK_INFO info) throws CKR_Exception
CKR_Exception
Cryptoki.C_GetInfo(com.safenetinc.jcprov.CK_INFO)
public static CK_RV C_GetSlotList(CK_BBOOL tokenPresent, long[] slotList, LongRef count) throws CKR_Exception
public static CK_RV C_GetSlotInfo(long slotID, CK_SLOT_INFO info) throws CKR_Exception
public static CK_RV C_GetTokenInfo(long slotID, CK_TOKEN_INFO info) throws CKR_Exception
public static CK_RV C_GetMechanismList(long slotID, CK_MECHANISM_TYPE[] mechanismList, LongRef count) throws CKR_Exception
public static CK_RV C_GetMechanismInfo(long slotID, CK_MECHANISM_TYPE type, CK_MECHANISM_INFO info) throws CKR_Exception
public static CK_RV C_InitToken(long slotID, byte[] pin, long pinLen, byte[] label) throws CKR_Exception
CKR_Exception
Cryptoki.C_InitToken(long, byte[], long, byte[])
public static CK_RV C_InitPIN(CK_SESSION_HANDLE hSession, byte[] pin, long pinLen) throws CKR_Exception
public static CK_RV C_SetPIN(CK_SESSION_HANDLE hSession, byte[] oldPin, long oldLen, byte[] newPin, long newLen) throws CKR_Exception
public static CK_RV C_OpenSession(long slotID, long flags, java.lang.Object pApplication, java.lang.Object notifyUnsupported, CK_SESSION_HANDLE hSession) throws CKR_Exception
public static CK_RV C_CloseSession(CK_SESSION_HANDLE hSession) throws CKR_Exception
public static CK_RV C_CloseAllSessions(long slotID) throws CKR_Exception
CKR_Exception
Cryptoki.C_CloseAllSessions(long)
public static CK_RV C_GetSessionInfo(CK_SESSION_HANDLE hSession, CK_SESSION_INFO info) throws CKR_Exception
public static CK_RV C_GetOperationState(CK_SESSION_HANDLE hSession, byte[] operationState, LongRef operationStateLen) throws CKR_Exception
public static CK_RV C_SetOperationState(CK_SESSION_HANDLE hSession, byte[] operationState, long operationStateLen, CK_OBJECT_HANDLE hEncryptionKey, CK_OBJECT_HANDLE hAuthenticationKey) throws CKR_Exception
public static CK_RV C_Login(CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, byte[] pin, long pinLen) throws CKR_Exception
public static CK_RV C_Logout(CK_SESSION_HANDLE hSession) throws CKR_Exception
public static CK_RV C_CreateObject(CK_SESSION_HANDLE hSession, CK_ATTRIBUTE[] template, long attributeCount, CK_OBJECT_HANDLE hObject) throws CKR_Exception
public static CK_RV C_CopyObject(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE[] template, long attributeCount, CK_OBJECT_HANDLE hNewObject) throws CKR_Exception
public static CK_RV C_DestroyObject(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject) throws CKR_Exception
public static CK_RV C_GetObjectSize(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, LongRef size) throws CKR_Exception
public static CK_RV C_GetAttributeValue(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE[] template, long attributeCount) throws CKR_Exception
public static CK_RV C_SetAttributeValue(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE[] template, long attributeCount) throws CKR_Exception
public static CK_RV C_FindObjectsInit(CK_SESSION_HANDLE hSession, CK_ATTRIBUTE[] template, long attributeCount) throws CKR_Exception
public static CK_RV C_FindObjects(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE[] hObjects, long maxObjectCount, LongRef objectCount) throws CKR_Exception
public static CK_RV C_FindObjectsFinal(CK_SESSION_HANDLE hSession) throws CKR_Exception
public static CK_RV C_EncryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_Encrypt(CK_SESSION_HANDLE hSession, byte[] data, long dataLen, byte[] encryptedData, LongRef encryptedDataLen) throws CKR_Exception
public static CK_RV C_EncryptUpdate(CK_SESSION_HANDLE hSession, byte[] part, long partLen, byte[] encryptedPart, LongRef encryptedPartLen) throws CKR_Exception
public static CK_RV C_EncryptUpdate(CK_SESSION_HANDLE hSession, CK_MECHANISM mech, byte[] part, long partLen, byte[] encryptedPart, LongRef encryptedPartLen) throws CKR_Exception
public static CK_RV C_EncryptFinal(CK_SESSION_HANDLE hSession, byte[] lastEncryptedPart, LongRef lastEncryptedPartLen) throws CKR_Exception
public static CK_RV C_EncryptFinal(CK_SESSION_HANDLE hSession, CK_MECHANISM mech, byte[] lastEncryptedPart, LongRef lastEncryptedPartLen) throws CKR_Exception
public static CK_RV C_DecryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_Decrypt(CK_SESSION_HANDLE hSession, byte[] encryptedData, long encryptedDataLen, byte[] data, LongRef dataLen) throws CKR_Exception
public static CK_RV C_DecryptUpdate(CK_SESSION_HANDLE hSession, byte[] encryptedPart, long encryptedPartLen, byte[] part, LongRef partLen) throws CKR_Exception
public static CK_RV C_DecryptUpdate(CK_SESSION_HANDLE hSession, CK_MECHANISM mech, byte[] encryptedPart, long encryptedPartLen, byte[] part, LongRef partLen) throws CKR_Exception
public static CK_RV C_DecryptFinal(CK_SESSION_HANDLE hSession, byte[] lastPart, LongRef lastPartLen) throws CKR_Exception
public static CK_RV C_DecryptFinal(CK_SESSION_HANDLE hSession, CK_MECHANISM mech, byte[] lastPart, LongRef lastPartLen) throws CKR_Exception
public static CK_RV C_DigestInit(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism) throws CKR_Exception
public static CK_RV C_Digest(CK_SESSION_HANDLE hSession, byte[] data, long dataLen, byte[] digest, LongRef digestLen) throws CKR_Exception
public static CK_RV C_DigestUpdate(CK_SESSION_HANDLE hSession, byte[] part, long partLen) throws CKR_Exception
public static CK_RV C_DigestKey(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_DigestFinal(CK_SESSION_HANDLE hSession, byte[] digest, LongRef digestLen) throws CKR_Exception
public static CK_RV C_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_Sign(CK_SESSION_HANDLE hSession, byte[] data, long dataLen, byte[] signature, LongRef signatureLen) throws CKR_Exception
public static CK_RV C_SignUpdate(CK_SESSION_HANDLE hSession, byte[] part, long partLen) throws CKR_Exception
public static CK_RV C_SignFinal(CK_SESSION_HANDLE hSession, byte[] signature, LongRef signatureLen) throws CKR_Exception
public static CK_RV C_SignRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_SignRecover(CK_SESSION_HANDLE hSession, byte[] data, long dataLen, byte[] signature, LongRef signatureLen) throws CKR_Exception
public static CK_RV C_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_Verify(CK_SESSION_HANDLE hSession, byte[] data, long dataLen, byte[] signature, long signatureLen) throws CKR_Exception
public static CK_RV C_VerifyUpdate(CK_SESSION_HANDLE hSession, byte[] part, long partLen) throws CKR_Exception
public static CK_RV C_VerifyFinal(CK_SESSION_HANDLE hSession, byte[] signature, long signatureLen) throws CKR_Exception
public static CK_RV C_VerifyRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_VerifyRecover(CK_SESSION_HANDLE hSession, byte[] signature, long signatureLen, byte[] data, LongRef dataLen) throws CKR_Exception
public static CK_RV C_DigestEncryptUpdate(CK_SESSION_HANDLE hSession, byte[] part, long partLen, byte[] encryptedPart, LongRef encryptedPartLen) throws CKR_Exception
public static CK_RV C_DecryptDigestUpdate(CK_SESSION_HANDLE hSession, byte[] encryptedPart, long encryptedPartLen, byte[] part, LongRef partLen) throws CKR_Exception
public static CK_RV C_SignEncryptUpdate(CK_SESSION_HANDLE hSession, byte[] part, long partLen, byte[] encryptedPart, LongRef encryptedPartLen) throws CKR_Exception
public static CK_RV C_DecryptVerifyUpdate(CK_SESSION_HANDLE hSession, byte[] encryptedPart, long encryptedPartLen, byte[] part, LongRef partLen) throws CKR_Exception
public static CK_RV C_GenerateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_ATTRIBUTE[] template, long attributeCount, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_GenerateKeyPair(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_ATTRIBUTE[] publicKeyTemplate, long publicKeyAttributeCount, CK_ATTRIBUTE[] privateKeyTemplate, long privateKeyAttributeCount, CK_OBJECT_HANDLE hPublicKey, CK_OBJECT_HANDLE hPrivateKey) throws CKR_Exception
CKR_Exception
Cryptoki.C_GenerateKeyPair(com.safenetinc.jcprov.CK_SESSION_HANDLE, com.safenetinc.jcprov.CK_MECHANISM, com.safenetinc.jcprov.CK_ATTRIBUTE[], long, com.safenetinc.jcprov.CK_ATTRIBUTE[], long, com.safenetinc.jcprov.CK_OBJECT_HANDLE, com.safenetinc.jcprov.CK_OBJECT_HANDLE)
public static CK_RV C_WrapKey(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hWrappingKey, CK_OBJECT_HANDLE hKey, byte[] wrappedKey, LongRef wrappedKeyLen) throws CKR_Exception
public static CK_RV C_UnwrapKey(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hUnwrappingKey, byte[] wrappedKey, long wrappedKeyLen, CK_ATTRIBUTE[] template, long attributeCount, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_DeriveKey(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hBaseKey, CK_ATTRIBUTE[] template, long attributeCount, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV C_SeedRandom(CK_SESSION_HANDLE hSession, byte[] seed, long seedLen) throws CKR_Exception
public static CK_RV C_GenerateRandom(CK_SESSION_HANDLE hSession, byte[] randomData, long randomLen) throws CKR_Exception
public static CK_RV C_GetFunctionStatus(CK_SESSION_HANDLE hSession) throws CKR_Exception
public static CK_RV C_CancelFunction(CK_SESSION_HANDLE hSession) throws CKR_Exception
public static CK_RV C_WaitForSlotEvent(long flags, LongRef slot, java.lang.Object reserved) throws CKR_Exception
public static CK_RV CA_SetApplicationID(long ulHigh, long ulLow) throws CKR_Exception
CKR_Exception
Cryptoki.CA_SetApplicationID(long, long)
public static CK_RV CA_OpenApplicationID(long SlotID, long ulHigh, long ulLow) throws CKR_Exception
CKR_Exception
Cryptoki.CA_OpenApplicationID(long, long, long)
public static CK_RV CA_CloseApplicationID(long SlotID, long ulHigh, long ulLow) throws CKR_Exception
CKR_Exception
Cryptoki.CA_CloseApplicationID(long, long, long)
public static CK_RV CA_HALogin(CK_SESSION_HANDLE hSession, byte[] pEncryptedPin, long ulEncryptedPinLen, byte[] pMofNBlob, LongRef pulMofNBlobLen) throws CKR_Exception
public static CK_RV CA_HAGetMasterPublic(long slotId, byte[] pCertificate, LongRef pulCertificate) throws CKR_Exception
public static CK_RV CA_HAGetMasterPublic_V1_1(CK_SESSION_HANDLE session, byte[] masterPublicData, LongRef masterPublicDataLen) throws CKR_Exception
public static CK_RV CA_HAGetMasterPublicData(CK_SESSION_HANDLE session, CK_OBJECT_HANDLE privateKey, byte[] masterPublicData, LongRef masterPublicDataLen) throws CKR_Exception
public static CK_RV CA_HAGetLoginChallenge(CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, byte[] pCertificate, long ulCertificateLen, byte[] pChallengeBlob, LongRef pulChallengeBlobLen) throws CKR_Exception
public static CK_RV CA_HAAnswerLoginChallenge(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hLoginPrivateKey, byte[] pChallengeBlob, long ulChallengeBlobLen, byte[] pEncryptedPin, LongRef pulEncryptedPinLen) throws CKR_Exception
public static CK_RV CA_HAInit(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hLoginPrivateKey) throws CKR_Exception
public static CK_RV CA_HAInitExtended(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hLoginPrivateKey, byte[] loginPrivateKeyPKC, long loginPrivateKeyPKCLen, int[] userTypes, int[] tokenTypes, long numberOfRole) throws CKR_Exception
public static CK_RV CA_GetTokenCertificates(long slotID, long attributeType, byte[] attributeValue, LongRef attributeValueLen) throws CKR_Exception
public static CK_RV CA_DeriveKeyAndWrap(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, CK_OBJECT_HANDLE hBaseKey, CK_ATTRIBUTE[] template, long attributeCount, CK_MECHANISM mechanismWrap, CK_OBJECT_HANDLE hWrappingKey, byte[] wrappedKey, LongRef wrappedKeyLen) throws CKR_Exception
CKR_Exception
Cryptoki.CA_DeriveKeyAndWrap(com.safenetinc.jcprov.CK_SESSION_HANDLE, com.safenetinc.jcprov.CK_MECHANISM, com.safenetinc.jcprov.CK_OBJECT_HANDLE, com.safenetinc.jcprov.CK_ATTRIBUTE[], long, com.safenetinc.jcprov.CK_MECHANISM, com.safenetinc.jcprov.CK_OBJECT_HANDLE, byte[], com.safenetinc.jcprov.LongRef)
public static CK_RV CA_GetHSMPolicySetting(long slotId, HsmPolicy policy, LongRef policyValue)
public static CK_RV CA_GetFirmwareVersion(long slotID, LongRef major, LongRef minor, LongRef subminor) throws CKR_Exception
public static CK_RV CA_Bip32ImportPublicKey(CK_SESSION_HANDLE hSession, byte[] key, CK_OBJECT_HANDLE hKey) throws CKR_Exception
public static CK_RV CA_Bip32ExportPublicKey(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey, byte[] key) throws CKR_Exception
public static CK_RV CA_EncodeEdwardsPrivateKey(byte[] curveParams, byte[] key, byte[] encKey, LongRef encKeyLen)
public static CK_RV CA_EncodeEdwardsPublicKey(byte[] key, byte[] encKey, LongRef encKeyLen)
public static CK_RV CA_SIMInsert(CK_SESSION_HANDLE hSession, long authSubsetCount, long authForm, int[] authSecretSizes, byte[][] authSecretList, long blobLen, byte[] blob, LongRef handleCount, CK_OBJECT_HANDLE[] handles)
public static CK_RV CA_SIMMultiSign(CK_SESSION_HANDLE hSession, CK_MECHANISM mechanism, long authSubsetCount, long authForm, int[] authSecretSizes, byte[][] authSecretList, long blobLen, byte[] blob, long dataCount, int[] dataLens, byte[][] datas, LongRef[] signatureLens, byte[][] signatures)
public static CK_RV CA_SIMExtract(CK_SESSION_HANDLE hSession, long handleCount, CK_OBJECT_HANDLE[] objectHandles, long authSecretCount, long authSubsetCount, long authForm, int[] authSecretSizes, byte[][] authSecretList, boolean deleteAfterExtract, LongRef blobLen, byte[] blob)
public static CK_RV CA_AuthorizeKey(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey, byte[] authData)
public static CK_RV CA_SetAuthorizationData(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey, byte[] oldAuthData, byte[] newAuthData)
public static CK_RV CA_ResetAuthorizationData(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey, byte[] authData)
public static CK_RV CA_AssignKey(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey)
public static CK_RV CA_IncrementFailedAuthCount(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey)
public static CK_RV CA_SMKRollover(CK_SESSION_HANDLE session, long value)
public static CK_RV CA_CloneObject(CK_SESSION_HANDLE targetSession, CK_SESSION_HANDLE sourceSession, long objectType, CK_OBJECT_HANDLE objectHandle, CK_OBJECT_HANDLE clonedObjectHandle)
public static CK_RV CA_CloneAsSourceInit(CK_SESSION_HANDLE sourceSession, byte[] dummy, LongRef dummySize, byte[] outputBlob, LongRef outputBlobLen, boolean replicate)
public static CK_RV CA_CloneAsTargetInit(CK_SESSION_HANDLE targetSession, byte[] inputBlob, LongRef inputBlobSize, byte[] dummy, LongRef dummySize, boolean replicate, byte[] outputBlob, LongRef outputBlobLen)
public static CK_RV CA_CloneAsSource(CK_SESSION_HANDLE sourceSession, long sourceObjectType, CK_OBJECT_HANDLE sourceObjectHandle, byte[] inputeBLob, LongRef inputBlobSize, boolean replicate, byte[] outputBlob, LongRef outputBlobLen)
public static CK_RV CA_CloneAsTarget(CK_SESSION_HANDLE targetSession, byte[] dummy, LongRef dummySize, byte[] inputeBlob, LongRef inputBlobSize, long sourceObjectType, CK_OBJECT_HANDLE sourceObjectHandle, boolean replicate, CK_OBJECT_HANDLE clonedObjectHandle)
Copyright (c) 2025 Thales Group. All rights reserved.