Accessing a Previously Encrypted Database

If an application is starting up using a previously existing database that has been encrypted, the encryption key must be set in the connection profile before any database operations are done. This is done using the connection profile's setEncryptionKey() API.

[[SMP101SMP101DB getConnectionProfile] setEncryptionKey:newKey];
[SMP101SMP101DB closeConnection];