Differences
This shows you the differences between two versions of the page.
en:sdk_api [2018/04/16 17:03] yjjung [SDK API] |
en:sdk_api [2024/02/27 13:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== SDK API ====== | ||
- | |||
- | The followings are a set of APIs that initialize device management information and that are used for dynamic memory control and PIN code generation.\\ | ||
- | * [[BS2_Version]]: Returns the SDK version. | ||
- | * [[BS2_AllocateContext]]: Allocates the device management Context. | ||
- | * [[BS2_ReleaseContext]]: Releases the device management Context. | ||
- | * [[BS2_Initialize]]: Initializes the device management Context. | ||
- | * [[BS2_ReleaseObject]]: Releases dynamic memory. | ||
- | * [[BS2_MakePinCode]]: Encrypts the PIN. | ||
- | * [[BS2_SetMaxThreadCount]]: Specifies the maximum thread count. | ||
- | * [[BS2_ComputeCRC16CCITT]]: Calculates the CRC-16 CCITT checksum. | ||
- | * [[BS2_GetCardModel]]: Retrieves the supported card models. | ||
- | * [[BS2_GetDataEncryptKey]]: Gets the encryption key for the device. | ||
- | * [[BS2_SetDataEncryptKey]]: Sets the encryption key for the device. | ||
- | * [[BS2_RemoveDataEncryptKey]]: Removes the encryption key for the device. | ||
- | |||
- | |||
- | ===== Structure ===== | ||
- | ==== BS2CredentialKeyInfo ==== | ||
- | <code cpp> | ||
- | /** | ||
- | * BS2_CRED_KEY_REQ | ||
- | */ | ||
- | enum | ||
- | { | ||
- | BS2_CRED_KEY_REQ_COMM = 0, | ||
- | BS2_CRED_KEY_REQ_DATA = 1, | ||
- | }; | ||
- | |||
- | enum | ||
- | { | ||
- | BS2_CRED_KEY_SIZE = 32, | ||
- | }; | ||
- | |||
- | /** | ||
- | * BS2CredentialKeyInfo | ||
- | */ | ||
- | typedef struct | ||
- | { | ||
- | uint32_t maxPacketSize; ///< 4 bytes | ||
- | uint8_t key[BS2_CRED_KEY_SIZE]; ///< 32 bytes | ||
- | uint8_t dualIDSupported; ///< 1 byte | ||
- | uint8_t useAlphanumericID; ///< 1 byte | ||
- | uint8_t credentialKeySupported; ///< 1 byte | ||
- | uint8_t credentialKeyRequest; ///< 1 byte | ||
- | uint8_t reserved[28]; ///< 28 bytes (reserved) | ||
- | } BS2CredentialKeyInfo; | ||
- | </code> | ||
- | |||
- | 1. //maxPacketSize// \\ | ||
- | The maximum TCP packet size allowed by the device. \\ | ||
- | |||
- | 2. //key// \\ | ||
- | The key value used by the device. \\ | ||
- | Depending on the credentialKeyRequest setting, you can get a communication encryption key, or a data encryption key.\\ | ||
- | |||
- | 3. //dualIDSupported// \\ | ||
- | Indicates whether the device's userID format (number, character) is allowed to change. \\ | ||
- | |||
- | 4. //useAlphanumericID// \\ | ||
- | A flag indicating whether the device uses an alphanumeric userID. \\ | ||
- | |||
- | 5. //credentialKeySupported// \\ | ||
- | Indicates whether data key changes are allowed. \\ | ||
- | Device supports data credential key changes when the release date of FW for each device is later than 30 Mar 2018, \\ | ||
- | So it indicates whether the currently connected device supports the modification of these keys. \\ | ||
- | |||
- | 6. //credentialKeyRequest// \\ | ||
- | You can use this setting to request a key for the device. \\ | ||
- | This setting is applicable only when the release date of FW for each device is later than 30 Mar 2018.\\ | ||
- | In the case of the previous FW, only the communication key is returned regardless of whether this is set or not. | ||
- | <WRAP group 50%> | ||
- | ^Value ^Description ^ | ||
- | |BS2_CRED_KEY_REQ_COMM |Communication credential key request | | ||
- | |BS2_CRED_KEY_REQ_DATA |Data credential key reuqest | | ||
- | </WRAP> | ||
- | |||
- | 7. //reserved// \\ | ||
- | Reserved space. \\ |