#ifndef __musclecard_h__
#define __musclecard_h__
#ifdef __cplusplus
extern "C"
{
#endif
#ifdef WIN32
#include "PCSC.h"
#endif
#ifndef __APPLE__
#include <mscdefines.h>
#else
#include <PCSC/mscdefines.h>
#endif
#define MSC_SUCCESS 0x9000
#define MSC_NO_MEMORY_LEFT 0x9C01
#define MSC_AUTH_FAILED 0x9C02
#define MSC_OPERATION_NOT_ALLOWED 0x9C03
#define MSC_INCONSISTENT_STATUS 0x9C04
#define MSC_UNSUPPORTED_FEATURE 0x9C05
#define MSC_UNAUTHORIZED 0x9C06
#define MSC_OBJECT_NOT_FOUND 0x9C07
#define MSC_OBJECT_EXISTS 0x9C08
#define MSC_INCORRECT_ALG 0x9C09
#define MSC_SIGNATURE_INVALID 0x9C0B
#define MSC_IDENTITY_BLOCKED 0x9C0C
#define MSC_UNSPECIFIED_ERROR 0x9C0D
#define MSC_TRANSPORT_ERROR 0x9C0E
#define MSC_INVALID_PARAMETER 0x9C0F
#define MSC_INCORRECT_P1 0x9C10
#define MSC_INCORRECT_P2 0x9C11
#define MSC_SEQUENCE_END 0x9C12
#define MSC_INTERNAL_ERROR 0x9CFF
#define MSC_CANCELLED 0x9C50
#define MSC_INSUFFICIENT_BUFFER 0x9C51
#define MSC_UNRECOGNIZED_TOKEN 0x9C52
#define MSC_SERVICE_UNRESPONSIVE 0x9C53
#define MSC_TIMEOUT_OCCURRED 0x9C54
#define MSC_TOKEN_REMOVED 0x9C55
#define MSC_TOKEN_RESET 0x9C56
#define MSC_TOKEN_INSERTED 0x9C57
#define MSC_TOKEN_UNRESPONSIVE 0x9C58
#define MSC_INVALID_HANDLE 0x9C59
#define MSC_SHARING_VIOLATION 0x9C60
#define MSC_BLOCKSTATUS_RESUME 0x0000
#define MSC_BLOCKSTATUS_BLOCKING 0x0001
#define MSC_BLOCKSTATUS_CANCELLING 0x0002
#define MSC_MAX_KEYS 16
#define MSC_MAX_PINS 8
#define MSC_SIZEOF_KEYPACKET 200
#define MSC_MAXSIZEOF_APDU_DATALEN 255
#define MSC_PERCENT_STEPSIZE 1000
#define MSC_SINGLE_READ_PACKET 255
#define MSC_MAXSIZE_TOKENARRAY 255
#define MSC_GEN_ALG_RSA 0x00
#define MSC_GEN_ALG_RSA_CRT 0x01
#define MSC_GEN_ALG_DSA 0x02
#define MSC_GEN_ALG_DES 0x03
#define MSC_GEN_ALG_3DES 0x04
#define MSC_GEN_ALG_3DES3 0x05
#define MSC_BLOB_ENC_PLAIN 0x00
#define MSC_BLOB_ENC_CRYPT 0x01
#define MSC_KEY_RSA_PUBLIC 0x01
#define MSC_KEY_RSA_PRIVATE 0x02
#define MSC_KEY_RSA_PRIVATE_CRT 0x03
#define MSC_KEY_DSA_PUBLIC 0x04
#define MSC_KEY_DSA_PRIVATE 0x05
#define MSC_KEY_DES 0x06
#define MSC_KEY_3DES 0x07
#define MSC_KEY_3DES3 0x08
#define MSC_OPT_DEFAULT 0x00
#define MSC_OPT_RSA_PUB_EXP 0x01
#define MSC_OPT_DSA_GPQ 0x02
#define MSC_CIPHER_INIT 0x01
#define MSC_CIPHER_PROCESS 0x02
#define MSC_CIPHER_FINAL 0x03
#define MSC_MODE_RSA_NOPAD 0x00
#define MSC_MODE_RSA_PAD_PKCS1 0x01
#define MSC_MODE_DSA_SHA 0x10
#define MSC_MODE_DES_CBC_NOPAD 0x20
#define MSC_MODE_DES_ECB_NOPAD 0x21
#define MSC_DIR_SIGN 0x01
#define MSC_DIR_VERIFY 0x02
#define MSC_DIR_ENCRYPT 0x03
#define MSC_DIR_DECRYPT 0x04
#define MSC_SEQUENCE_RESET 0x00
#define MSC_SEQUENCE_NEXT 0x01
#define MSC_ZF_DEFAULT 0x00
#define MSC_ZF_WRITE_ZERO 0x01
#define MSC_AUT_ALL 0x0000
#define MSC_AUT_NONE 0xFFFF
#define MSC_AUT_PIN_0 0x0001
#define MSC_AUT_PIN_1 0x0002
#define MSC_AUT_PIN_2 0x0004
#define MSC_AUT_PIN_3 0x0008
#define MSC_AUT_PIN_4 0x0010
#define MSC_AUT_KEY_0 0x0100
#define MSC_AUT_KEY_1 0x0200
#define MSC_AUT_KEY_2 0x0400
#define MSC_AUT_KEY_3 0x0800
#define MSC_AUT_KEY_4 0x1000
#define MSC_AUT_KEY_5 0x2000
#define MSC_AUT_USR_0 0x4000
#define MSC_AUT_USR_1 0x8000
#define MSC_INIT_DEFAULT_KEY 0x00
#define MSC_INIT_IGNORE_KEY 0x01
#define MSC_INIT_USE_KEY 0x02
typedef struct
{
MSCUChar8 transportKey[MAX_BUFFER_SIZE];
MSCULong32 transportKeyLen;
MSCUChar8 transportBehavior;
MSCULong32 objectMemory;
MSCUChar8 newTransportKey[MAX_BUFFER_SIZE];
MSCULong32 newTransportKeyLen;
MSCUChar8 defaultCHV[MAX_BUFFER_SIZE];
MSCULong32 defaultCHVLen;
MSCUChar8 defaultCHVTries;
MSCUChar8 defaultCHVUnblock[MAX_BUFFER_SIZE];
MSCULong32 defaultCHVUnblockSize;
MSCUChar8 defaultCHVUnblockTries;
MSCUShort16 createObjectACL;
MSCUShort16 createKeysACL;
MSCUShort16 createPINsACL;
MSCUChar8 maxNumberKeys;
MSCUChar8 maxNumberPINs;
MSCUShort16 maxNumberObjects;
}
MSCInitTokenParams, *MSCLPInitTokenParams;
#define MSC_KEYPOLICY_MODE_RSA_NOPAD 0x0001
#define MSC_KEYPOLICY_MODE_RSA_PAD_PKCS1 0x0002
#define MSC_KEYPOLICY_MODE_DSA_SHA 0x0004
#define MSC_KEYPOLICY_MODE_DES_CBC_NOPAD 0x0008
#define MSC_KEYPOLICY_MODE_DES_ECB_NOPAD 0x0010
#define MSC_KEYPOLICY_DIR_SIGN 0x0100
#define MSC_KEYPOLICY_DIR_VERIFY 0x0200
#define MSC_KEYPOLICY_DIR_ENCRYPT 0x0400
#define MSC_KEYPOLICY_DIR_DECRYPT 0x0800
typedef struct
{
MSCUShort16 cipherMode;
MSCUShort16 cipherDirection;
}
MSCKeyPolicy, *MSCLPKeyPolicy;
typedef struct
{
MSCUShort16 readPermission;
MSCUShort16 writePermission;
MSCUShort16 usePermission;
}
MSCKeyACL, *MSCLPKeyACL;
typedef struct
{
MSCUShort16 readPermission;
MSCUShort16 writePermission;
MSCUShort16 deletePermission;
}
MSCObjectACL, *MSCLPObjectACL, MSCCertACL, *MSCLPCertACL;
typedef struct
{
MSCUChar8 algoType;
MSCUShort16 keySize;
MSCKeyACL privateKeyACL;
MSCKeyACL publicKeyACL;
MSCKeyPolicy privateKeyPolicy;
MSCKeyPolicy publicKeyPolicy;
MSCUChar8 keyGenOptions;
MSCPUChar8 pOptParams;
MSCULong32 optParamsSize;
}
MSCGenKeyParams, *MSCLPGenKeyParams;
typedef MSCPUChar8 MSCLPKeyBlob;
typedef struct
{
MSCUChar8 keyNum;
MSCUChar8 keyType;
MSCUChar8 keyPartner;
MSCUChar8 keyMapping;
MSCUShort16 keySize;
MSCKeyPolicy keyPolicy;
MSCKeyACL keyACL;
}
MSCKeyInfo, *MSCLPKeyInfo;
typedef struct
{
MSCUChar8 keyNum;
MSCUChar8 cipherMode;
MSCUChar8 cipherDirection;
MSCPUChar8 optParams;
MSCUShort16 optParamsSize;
}
MSCCryptInit, *MSCLPCryptInit;
#define MSC_LIST_KNOWN 1
#define MSC_LIST_SLOTS 2
#define MSC_LIST_ALL 3
#define MSC_TOKEN_EMPTY_STR "Token Removed"
#define MSC_TOKEN_UNKNOWN_STR "Token Unknown"
#define MSC_TOKEN_TYPE_REMOVED 1
#define MSC_TOKEN_TYPE_UNKNOWN 2
#define MSC_TOKEN_TYPE_KNOWN 4
#define MSC_TOKEN_TYPE_RESET 8
#define MSC_LEAVE_TOKEN SCARD_LEAVE_CARD
#define MSC_RESET_TOKEN SCARD_RESET_CARD
#define MSC_EJECT_TOKEN SCARD_EJECT_CARD
#define MSC_SHARE_SHARED SCARD_SHARE_SHARED
#define MSC_SHARE_EXCLUSIVE SCARD_SHARE_EXCLUSIVE
#define MSC_SHARE_DIRECT SCARD_SHARE_DIRECT
#define MSC_STATE_UNAWARE 0x4000
#define MSC_STATE_CHANGED SCARD_STATE_CHANGED
#define MSC_STATE_UNKNOWN SCARD_STATE_UNKNOWN
#define MSC_STATE_UNAVAILABLE SCARD_STATE_UNAVAILABLE
#define MSC_STATE_EMPTY SCARD_STATE_EMPTY
#define MSC_STATE_PRESENT SCARD_STATE_PRESENT
#define MSC_STATE_EXCLUSIVE SCARD_STATE_EXCLUSIVE
#define MSC_STATE_INUSE SCARD_STATE_INUSE
#define MSC_STATE_MUTE SCARD_STATE_MUTE
#define MSC_NO_TIMEOUT INFINITE
#define MSC_TAG_SUPPORT_FUNCTIONS 101
#define MSC_TAG_SUPPORT_CRYPTOALG 102
#define MSC_TAG_CAPABLE_RSA 103
#define MSC_TAG_CAPABLE_DSA 104
#define MSC_TAG_CAPABLE_ECURVE 105
#define MSC_TAG_CAPABLE_ELGAMAL 106
#define MSC_TAG_CAPABLE_KEY_AUTH 180
#define MSC_TAG_CAPABLE_DES 201
#define MSC_TAG_CAPABLE_3DES 202
#define MSC_TAG_CAPABLE_IDEA 203
#define MSC_TAG_CAPABLE_AES 204
#define MSC_TAG_CAPABLE_BLOWFISH 205
#define MSC_TAG_CAPABLE_TWOFISH 206
#define MSC_TAG_CAPABLE_MD5 207
#define MSC_TAG_CAPABLE_SHA1 208
#define MSC_TAG_CAPABLE_OBJ_ATTR 301
#define MSC_TAG_CAPABLE_OBJ_IDSIZE 302
#define MSC_TAG_CAPABLE_OBJ_AUTH 303
#define MSC_TAG_CAPABLE_OBJ_MAXNUM 304
#define MSC_TAG_CAPABLE_PIN_ATTR 401
#define MSC_TAG_CAPABLE_PIN_MAXNUM 402
#define MSC_TAG_CAPABLE_PIN_MINSIZE 403
#define MSC_TAG_CAPABLE_PIN_MAXSIZE 404
#define MSC_TAG_CAPABLE_PIN_CHARSET 405
#define MSC_TAG_CAPABLE_PIN_POLICY 406
#define MSC_TAG_CAPABLE_PIN_AUTH 407
#define MSC_TAG_CAPABLE_ID_STATE 501
#define MSC_TAG_CAPABLE_RANDOM 600
#define MSC_TAG_CAPABLE_RANDOM_MAX 601
#define MSC_TAG_CAPABLE_RANDOM_MIN 602
#define MSC_SUPPORT_GENKEYS 0x00000001
#define MSC_SUPPORT_IMPORTKEY 0x00000002
#define MSC_SUPPORT_EXPORTKEY 0x00000004
#define MSC_SUPPORT_COMPUTECRYPT 0x00000008
#define MSC_SUPPORT_EXTAUTH 0x00000010
#define MSC_SUPPORT_LISTKEYS 0x00000020
#define MSC_SUPPORT_CREATEPIN 0x00000040
#define MSC_SUPPORT_VERIFYPIN 0x00000080
#define MSC_SUPPORT_CHANGEPIN 0x00000100
#define MSC_SUPPORT_UNBLOCKPIN 0x00000200
#define MSC_SUPPORT_LISTPINS 0x00000400
#define MSC_SUPPORT_CREATEOBJECT 0x00000800
#define MSC_SUPPORT_DELETEOBJECT 0x00001000
#define MSC_SUPPORT_WRITEOBJECT 0x00002000
#define MSC_SUPPORT_READOBJECT 0x00004000
#define MSC_SUPPORT_LISTOBJECTS 0x00008000
#define MSC_SUPPORT_LOGOUTALL 0x00010000
#define MSC_SUPPORT_GETCHALLENGE 0x00020000
#define MSC_SUPPORT_RSA 0x00000001
#define MSC_SUPPORT_DSA 0x00000002
#define MSC_SUPPORT_ECURVE 0x00000004
#define MSC_SUPPORT_ELGAMAL 0x00000008
#define MSC_SUPPORT_DES 0x00000010
#define MSC_SUPPORT_3DES 0x00000020
#define MSC_SUPPORT_IDEA 0x00000040
#define MSC_SUPPORT_AES 0x00000080
#define MSC_SUPPORT_BLOWFISH 0x00000100
#define MSC_SUPPORT_TWOFISH 0x00000200
#define MSC_SUPPORT_SHA1 0x00000400
#define MSC_SUPPORT_MD5 0x00000800
#define MSC_CAPABLE_RSA_512 0x00000001
#define MSC_CAPABLE_RSA_768 0x00000002
#define MSC_CAPABLE_RSA_1024 0x00000004
#define MSC_CAPABLE_RSA_2048 0x00000008
#define MSC_CAPABLE_RSA_4096 0x00000010
#define MSC_CAPABLE_RSA_KEYGEN 0x00001000
#define MSC_CAPABLE_RSA_NOPAD 0x00002000
#define MSC_CAPABLE_RSA_PKCS1 0x00004000
#define MSC_CAPABLE_DSA_512 0x00000001
#define MSC_CAPABLE_DSA_768 0x00000002
#define MSC_CAPABLE_DSA_1024 0x00000004
#define MSC_CAPABLE_DSA_2048 0x00000008
#define MSC_CAPABLE_DSA_4096 0x00000010
#define MSC_CAPABLE_DSA_KEYGEN 0x00001000
#define MSC_CAPABLE_DES_KEYGEN 0x00001000
#define MSC_CAPABLE_DES_CBC 0x00002000
#define MSC_CAPABLE_DES_EBC 0x00004000
#define MSC_CAPABLE_DES_ECB 0x00008000
#define MSC_CAPABLE_3DES_KEYGEN 0x00001000
#define MSC_CAPABLE_3DES_3KEY 0x00002000
#define MSC_CAPABLE_3DES_CBC 0x00004000
#define MSC_CAPABLE_3DES_EBC 0x00008000
#define MSC_CAPABLE_3DES_ECB 0x00010000
#define MSC_CAPABLE_IDEA_KEYGEN 0x00001000
#define MSC_CAPABLE_IDEA_CBC 0x00002000
#define MSC_CAPABLE_IDEA_ECB 0x00008000
#define MSC_CAPABLE_AES_KEYGEN 0x00001000
#define MSC_CAPABLE_AES_CBC 0x00002000
#define MSC_CAPABLE_AES_ECB 0x00008000
#define MSC_CAPABLE_OBJ_ZERO 0x00010000
#define MSC_CAPABLE_PIN_RESET 0x00000100
#define MSC_CAPABLE_PIN_LEAVE 0x00000200
#define MSC_CAPABLE_PIN_A_Z 0x00000001
#define MSC_CAPABLE_PIN_a_z 0x00000002
#define MSC_CAPABLE_PIN_0_9 0x00000004
#define MSC_CAPABLE_PIN_SPACE 0x00000008
#define MSC_CAPABLE_PIN_CALC 0x00000010
#define MSC_CAPABLE_PIN_NONALPHA 0x00000020
#define MSC_CAPABLE_PIN_A_Z 0x00000001
#define MSC_CAPABLE_PIN_a_z 0x00000002
#define MSC_CAPABLE_PIN_0_9 0x00000004
#define MSC_CAPABLE_PIN_NONALPHA 0x00000020
#define MSC_CAPABLE_PIN_HISTORY 0x00001000
#define MSC_CAPABLE_ID_STATE 0x00000001
#define MSC_CAPABLE_RANDOM_SEED 0x00000001
typedef struct
{
MSCUShort16 appVersion;
MSCUShort16 swVersion;
MSCULong32 freeMemory;
MSCULong32 totalMemory;
MSCUChar8 usedPINs;
MSCUChar8 usedKeys;
MSCUShort16 loggedID;
}
MSCStatusInfo, *MSCLPStatusInfo;
typedef struct
{
MSCChar8 objectID[MSC_MAXSIZE_OBJID];
MSCULong32 objectSize;
MSCObjectACL objectACL;
}
MSCObjectInfo, *MSCLPObjectInfo;
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCListTokens(MSCULong32 listScope,
MSCLPTokenInfo tokenArray,
MSCPULong32 arrayLength
);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCEstablishConnection(MSCLPTokenInfo tokenStruct,
MSCULong32 sharingMode,
MSCPUChar8 applicationName,
MSCULong32 nameSize,
MSCLPTokenConnection pConnection
);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCReleaseConnection(MSCLPTokenConnection pConnection,
MSCULong32 endAction
);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCWaitForTokenEvent(MSCLPTokenInfo tokenArray,
MSCULong32 arraySize,
MSCULong32 timeoutValue
);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCCancelEventWait(void
);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCCallbackForTokenEvent(MSCLPTokenInfo tokenArray,
MSCULong32 arraySize,
MSCCallBack callBack,
MSCPVoid32 appData
);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCCallbackCancelEvent(void);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCBeginTransaction(MSCLPTokenConnection pConnection
);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCEndTransaction(MSCLPTokenConnection pConnection,
MSCULong32 endAction
);
MSC_RV MSCSelectAID(MSCLPTokenConnection pConnection,
MSCPUChar8 aidValue, MSCULong32 aidSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCWriteFramework(MSCLPTokenConnection pConnection,
MSCLPInitTokenParams pInitParams);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCGetStatus(MSCLPTokenConnection pConnection,
MSCLPStatusInfo pStatusInfo);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCGetCapabilities(MSCLPTokenConnection pConnection,
MSCULong32 Tag, MSCPUChar8 Value, MSCPULong32 Length);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCExtendedFeature(MSCLPTokenConnection pConnection,
MSCULong32 extFeature,
MSCPUChar8 outData,
MSCULong32 outLength, MSCPUChar8 inData, MSCPULong32 inLength);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCGenerateKeys(MSCLPTokenConnection pConnection,
MSCUChar8 prvKeyNum,
MSCUChar8 pubKeyNum, MSCLPGenKeyParams pParams);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCImportKey(MSCLPTokenConnection pConnection,
MSCUChar8 keyNum,
MSCLPKeyACL pKeyACL,
MSCPUChar8 pKeyBlob,
MSCULong32 keyBlobSize,
MSCLPKeyPolicy keyPolicy,
MSCPVoid32 pAddParams, MSCUChar8 addParamsSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCExportKey(MSCLPTokenConnection pConnection,
MSCUChar8 keyNum,
MSCPUChar8 pKeyBlob,
MSCPULong32 keyBlobSize,
MSCPVoid32 pAddParams, MSCUChar8 addParamsSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCComputeCrypt(MSCLPTokenConnection pConnection,
MSCLPCryptInit cryptInit,
MSCPUChar8 pInputData,
MSCULong32 inputDataSize,
MSCPUChar8 pOutputData, MSCPULong32 outputDataSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCExtAuthenticate(MSCLPTokenConnection pConnection,
MSCUChar8 keyNum,
MSCUChar8 cipherMode,
MSCUChar8 cipherDirection,
MSCPUChar8 pData,
MSCULong32 dataSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCListKeys(MSCLPTokenConnection pConnection,
MSCUChar8 seqOption,
MSCLPKeyInfo pKeyInfo);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCCreatePIN(MSCLPTokenConnection pConnection,
MSCUChar8 pinNum,
MSCUChar8 pinAttempts,
MSCPUChar8 pPinCode,
MSCULong32 pinCodeSize,
MSCPUChar8 pUnblockCode,
MSCUChar8 unblockCodeSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCVerifyPIN(MSCLPTokenConnection pConnection,
MSCUChar8 pinNum,
MSCPUChar8 pPinCode,
MSCULong32 pinCodeSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCChangePIN(MSCLPTokenConnection pConnection,
MSCUChar8 pinNum,
MSCPUChar8 pOldPinCode,
MSCUChar8 oldPinCodeSize,
MSCPUChar8 pNewPinCode, MSCUChar8 newPinCodeSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCUnblockPIN(MSCLPTokenConnection pConnection,
MSCUChar8 pinNum,
MSCPUChar8 pUnblockCode, MSCULong32 unblockCodeSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCListPINs(MSCLPTokenConnection pConnection,
MSCPUShort16 pPinBitMask);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCCreateObject(MSCLPTokenConnection pConnection,
MSCString objectID,
MSCULong32 objectSize, MSCLPObjectACL pObjectACL);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCDeleteObject(MSCLPTokenConnection pConnection,
MSCString objectID, MSCUChar8 zeroFlag);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCWriteObject(MSCLPTokenConnection pConnection,
MSCString objectID, MSCULong32 offset,
MSCPUChar8 pInputData, MSCULong32 dataSize,
LPRWEventCallback rwCallback, MSCPVoid32 addParams);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCReadObject(MSCLPTokenConnection pConnection,
MSCString objectID, MSCULong32 offset,
MSCPUChar8 pOutputData, MSCULong32 dataSize,
LPRWEventCallback rwCallback, MSCPVoid32 addParams);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCReadAllocateObject(MSCLPTokenConnection pConnection,
MSCString objectID, MSCPUChar8 *pOutputData,
MSCPULong32 dataSize,
LPRWEventCallback rwCallback, MSCPVoid32 addParams);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCListObjects(MSCLPTokenConnection pConnection,
MSCUChar8 seqOption, MSCLPObjectInfo pObjectInfo);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCLogoutAll(MSCLPTokenConnection pConnection);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCGetChallenge(MSCLPTokenConnection pConnection,
MSCPUChar8 pSeed,
MSCUShort16 seedSize,
MSCPUChar8 pRandomData, MSCUShort16 randomDataSize);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCGetKeyAttributes(MSCLPTokenConnection pConnection,
MSCUChar8 keyNumber,
MSCLPKeyInfo pKeyInfo);
#ifdef WIN32
PCSC_API
#endif
MSC_RV MSCGetObjectAttributes(MSCLPTokenConnection pConnection,
MSCString objectID,
MSCLPObjectInfo pObjectInfo);
#ifdef WIN32
PCSC_API
#endif
char *msc_error(unsigned long int errorCode);
#ifdef WIN32
PCSC_API
#endif
MSCUChar8 MSCIsTokenReset(MSCLPTokenConnection pConnection);
#ifdef WIN32
PCSC_API
#endif
MSCUChar8 MSCClearReset(MSCLPTokenConnection pConnection);
#ifdef WIN32
PCSC_API
#endif
MSCUChar8 MSCIsTokenMoved(MSCLPTokenConnection pConnection);
#ifdef WIN32
PCSC_API
#endif
MSCUChar8 MSCIsTokenChanged(MSCLPTokenConnection pConnection);
#ifdef WIN32
PCSC_API
#endif
MSCUChar8 MSCIsTokenKnown(MSCLPTokenConnection pConnection);
#ifdef __cplusplus
}
#endif
#endif