6.2 Lock/Unlock Text
6.2.1 Lock Text
The lockText:success:failure
method of BayunCore
class locks text with default encryption-policy
and key-generation-policy
dictated by server settings.
Method parameters :
text : Text to be locked.
dataType :
NSString
success : Success block to be executed after text is successfully locked, returns locked text.
failure : Failure block to be executed if locking fails, returns
BayunError
.
6.2.2 Lock Text with Encryption Policy, Key Generation Policy
The lockText:encryptionPolicy:keyGenerationPolicy:groupId:success:failure
method with encryption-policy as an optional parameter locks text with the encryption key dictated by the policy. The method takes the following parameters :
text : Text to be locked.
dataType :
NSString
encryptionPolicy : BayunEncryptionPolicy determines the key for locking.
keyGenerationPolicy : BayunKeyGenerationPolicy determines the policy to generate the data encryption key.
groupId : GroupId is required if encryptionPolicy is
BayunEncryptionPolicyGroup
.success : Success block to be executed after text is successfully locked, returns locked text.
failure : Failure block to be executed if locking fails, returns
BayunError
.
If encryption-policy is other than BayunEncryptionPolicyGroup
then groupId should be nil.
6.2.3 Unlock Text
The unlockText
method of BayunCore
class unlocks a locked text. The method takes the following parameters :
text : Text to be unlocked.
dataType :
NSString
success : Success block to be executed after text is successfully unlocked, returns unlocked text.
failure : Failure block to be executed if unlocking fails, returns
BayunError
.
Last updated
Was this helpful?