6.2 Lock/Unlock Text
6.2.1 Lock Text
The lockText
method of BayunCore
class locks text with default encryption-policy
and key-generation-policy
dictated by server settings.
Parameters
text : Text to be locked.
success : Success block to be executed after text is successfully locked, returns locked text through key "lockedText".
failure : Failure block to be executed if locking fails, returns
BayunError
.
6.2.2 Lock Text with Encryption Policy, Key Generation Policy
The lockText
method with encryption policy, key generation policy as parameters locks text with the encryption key dictated by the policy.
Parameters
text : Text to be locked.
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 through key "lockedText".
failure : Failure block to be executed if locking fails, returns
BayunError
.
If encryption-policy is other than BayunEncryptionPolicyGroup
then groupId should be null.
6.2.3 Unlock Text
The unlockText
method of BayunCore
class unlocks text.
Parameters
text : Text to be unlocked.
success : Success block to be executed after text is successfully unlocked, returns unlocked text through key "unlockedText".
failure : Failure block to be executed if unlocking fails, returns BayunError.
Last updated
Was this helpful?