5.3 Lock/Unlock Binary Data
5.3.1 Lock Data
The lockData
function of BayunCore
class locks binary data with default BayunEncryptionPolicy and BayunKeyGenerationPolicy dictated by server settings.
The function takes the following parameters :
sessionId : Unique SessionId which is received in the registration/login function response.
data : Data to be locked.
dataType :
unsigned char*
data_len : Length of the data to be locked.
dataType :
size_t
5.3.2 Lock Data with Encryption Policy, Key Generation Policy
The lockData
function with encryption policy, key generation policy as parameters locks data with the encryption key dictated by the policy. The function takes the following parameters :
sessionId : Unique SessionId which is received in the registration/login function response.
data : Data to be locked.
dataType :
unsigned char*
data_len : Length of the data to be locked.
dataType :
size_t
encryptionPolicy : BayunEncryptionPolicy determines the key to be used to generate the lockingKey.
keyGenerationPolicy : BayunKeyGenerationPolicy determines the policy to generate the data encryption key.
groupId : GroupId is required if encryptionPolicy is BayunEncryptionPolicyGroup.
If encryptionPolicy is other than BayunEncryptionPolicyGroup
then groupId should be nil.
5.3.3 Unlock Data
The unlockData
function of BayunCore
class unlocks a locked binary data. The function takes the following parameters :
sessionId : Unique SessionId which is received in the registration/login function response.
data : Data to be unlocked.
dataType :
unsigned char*
data_len : Length of data to be unlocked.
dataType :
size_t
Last updated
Was this helpful?