setEncryptionKey:withError: method

A static method to set the unique 128-bit encryption key back to the code to perform the DB operations.

Syntax

+ ( void ) setEncryptionKey : ( NSString * ) key withError : ( NSError ** ) error

Parameters

Usage

This should only be called if the key exists in the vault. When passing key as null, the key will be cleared from the memory and no further operations could be possible. If the key is wrong i.e. not the one which was used for DB encryption, again no operation could be possible further until the correct key has been set.