CamouflageCredential

CamouflageCredential(userPIN, activationCode, cardString, additionalParams) is used to de-camouflage card string with activation code and re-camouflage with user PIN. Double-camouflage it if device locking interface is provided.
aatest
Description
CamouflageCredential(userPIN, activationCode, cardString, additionalParams) is used to de-camouflage card string with activation code and re-camouflage with user PIN. Double-camouflage it if device locking interface is provided.
This API camouflages the credential provided by application using user PIN. It accepts user pin, activation code and card string received by server as an input and returns the PIN camouflaged card string, which application stores in a persistent storage. It also double camouflages the credential if IDeviceLocker object is set by calling SetDeviceLocker() API.
API Signature
CAMOBILEOTPCRYPTOSDK_API SDK_STATUS CamouflageCredential(const std::string& userPIN, const std::string& activationCode, std::string& cardString) throw();
Parameters
userPIN [in]
user PIN provided by application. SDK does not perform any validation for pin length. It is application developers responsibility to validate pin value against the MPL_ or PTYP card attributes. Application can fetch value of card attribute using GetCardAttributeValue().
activationCode [in]
activation code provided by application. SDK does not perform any validation for activation code such as empty string etc.
cardString [in/out]
card string received by application from server after making provisioning request. Application should store updated card string in persistent storage.
Return Values
Return Value
Inference
SDKSTATUS_OK
Successful
SDKSTATUS_BADPARAM
CardString is empty or userPIN and activationCode both are empty
SDKSTATUS_ERROR_INVALID_CARDSTRING
Card string is corrupt or invalid
Remarks
Any special case for APIs input parameter or return values or special.