At the moment I am able to set the encryption key for my local database by doing the following:
if(![MyDemo_MyDemoDB databaseExists]){
SUPConnectionProfile* cp = [MyDemo_MyDemoDB
getConnectionProfile];
[cp setEncryptionKey:@"Yourkey"];
[MyDemo_MyDemoDB closeConnection];
}
So, when my user successfully logs in (by providing the correct password for the SUPDataVault), I am receiving the following error:
ERROR sup_sqlite_db_ConnectionWrapperImpl.m:62 dynamicStatement: There is an exception file is encrypted or is not a database
2011-12-21 13:32:05.112 MyDemo10389:11603 MBODebugLogger: SUPPersistenceException SUPPersistenceException from find: -- sup_sqlite_db_StatementWrapperImpl: There is an exception null value for sqlite3_stmt
2011-12-21 13:32:05.225 MyDemo10389:11603 *** Terminating app due to uncaught exception 'SUPPersistenceException', reason: 'SUPPersistenceException from find: -- sup_sqlite_db_StatementWrapperImpl: There is an exception null value for sqlite3_stmt'
What I think is happening is that although the data base was successfully created, its still encrypted. How do I decrypt it?
It's quite simple actually, I just needed to do this everytime I am starting a session:
SUPConnectionProfile* cp = [MyDemo_MyDemoDB
getConnectionProfile];
[cp setEncryptionKey:@"Yourkey"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With