Setting the Encryption key for the DataBase (Sybase Unwired Platform)

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?


实际上这很简单,我每次开始会话时都需要这样做:

SUPConnectionProfile* cp = [MyDemo_MyDemoDB
                                    getConnectionProfile];
[cp setEncryptionKey:@"Yourkey"];
链接地址: http://www.djcxy.com/p/56834.html

上一篇: Tomcat 6无法从WEB加载罐子

下一篇: 为数据库设置加密密钥(Sybase Unwired Platform)