SDK API > BS2_MakePinCodeWithKey


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.

Declaration

#include "BS_API.h"
 
int BS2_MakePinCodeWithKey(void* context, char* plaintext, unsigned char* ciphertext, const BS2EncryptKey* key)

Parameter

NOTE
ciphertext buffer size is BS2_PIN_HASH_SIZE

Return Value

If successfully done, BS_SDK_SUCCESS will be returned.
If there is an error, the corresponding error code will be returned.