SDK API > BS2_MakePinCodeWithKey
[+ 2.7.1] Encryptes PIN code with the user-defined PIN encryption key.
The user-defined PIN encryption key must be the one set by BS2_SetDataEncryptKey.
#include "BS_API.h" int BS2_MakePinCodeWithKey(void* context, char* plaintext, unsigned char* ciphertext, const BS2EncryptKey* key)
context
: Contextplaintext
: Plain text needs to be encrypted ciphertext
: Buffer to store encrypted data key
: User-defined encryption key information structure
NOTE
ciphertext buffer size is BS2_PIN_HASH_SIZE
If successfully done, BS_SDK_SUCCESS
will be returned.
If there is an error, the corresponding error code will be returned.