DoDeviceLocking

DoDeviceLocking API is used to bind the passed in CA Auth ID token to the current device so that the token becomes unusable if copied to other devices. To achieve device binding, a key derived from device-specific characteristics is required. The key is obtained from the custom device locking algorithm that is set using SetDeviceLocking API. If no custom device locking algorithm is set, then the input token is returned as is (not locked to device on which it is downloaded).
aa82test
Description
DoDeviceLocking API is used to bind the passed in CA Auth ID token to the current device so that the token becomes unusable if copied to other devices. To achieve device binding, a key derived from device-specific characteristics is required. The key is obtained from the custom device locking algorithm that is set using SetDeviceLocking API. If no custom device locking algorithm is set, then the input token is returned as is (not locked to device on which it is downloaded).
API Signature
SDK_STATUS DoDeviceLocking(std::string& authID) throw()
Parameters
authID [in/out]
Identifies Base64 encoded CA Auth ID token. This API makes use of device locking key set by SetDeviceLocker() to device device lock the CA Auth ID token so that it can not be used on other device. Application should store the updated (device locked) CA Auth ID token in persistent storage for further usage
Return Values
Return Value
Inference
SDKSTATUS_OK
Successful
SDKSTATUS_BADPARAM
AID is empty
SDKSTATUS_ERROR_INVALID_AID
if authID token is corrupt or invalid
SDKSTATUS_ERROR_NULL_DEVICE_LOCKER
if Device locker object is not set by calling SetDeviceLocker()