Encrypting the Client Database

There are two APIs that you can use to encrypt the client database.

generateEncryptionKey() causes a new random encryption key to be generated and used to encrypt the database. This key is immediately set in the connection profile.

NSString *newKey = nil;
[SUP101SUP101DB generateEncryptionKey];
newKey = [[SUP101SUP101DB getConnectionProfile] getEncryptionKey];
NSLog(@"generated encryption key = %@",newKey);
[SUP101SUP101DB closeConnection];

changeEncryptionKey() causes the database to be encrypted with the new key passed in.

[SUP101SUP101DB changeEncryptionKey:@"longEncryptionKeyValueABCDEFG"];
[SUP101SUP101DB closeConnection];