Old revisions Add to book Export to PDF Book Creator Add this page to your book Book Creator Remove this page from your book Manage book (0 page(s)) Help This is an old revision of the document! SDK API > BS2_SetDataEncryptKey BS2_SetDataEncryptKey [+ V2.6.0] Sets data encryption key. If the device's key is the same as the one you are currently setting, the key setting will be ignored. Also, if the key of the device is different from the one you want to set, the key will be set and the device's data will be erased. Declaration #include "BS_API.h" int BS2_SetDataEncryptKey(void* context, uint32_t deviceId, const BS2EncryptKey* keyInfo); See BS2EncryptKey Structure Parameter [In] context : Context [In] deviceId : Device ID [In] keyInfo : The address of the key information structure to set. Return Value If successfully done, BS_SDK_SUCCESS will be returned. If there is an error, the corresponding error code will be returned. See Also BS2_GetDataEncryptKey BS2_RemoveDataEncryptKey