【问题标题】:Setting the Encryption key for the DataBase (Sybase Unwired Platform)设置数据库的加密密钥(Sybase 无线平台)
【发布时间】:2012-01-25 07:55:46
【问题描述】:

目前,我可以通过执行以下操作为本地数据库设置加密密钥:

 if(![MyDemo_MyDemoDB databaseExists]){
        SUPConnectionProfile* cp = [MyDemo_MyDemoDB
                                    getConnectionProfile];
        [cp setEncryptionKey:@"Yourkey"];
        [MyDemo_MyDemoDB closeConnection];
    }

因此,当我的用户成功登录(通过为 SUPDataVault 提供正确密码)时,我收到以下错误:

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'

我认为正在发生的事情是,尽管数据库已成功创建,但它仍然是加密的。如何解密?

【问题讨论】:

    标签: ios sybase sup


    【解决方案1】:

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

    SUPConnectionProfile* cp = [MyDemo_MyDemoDB
                                        getConnectionProfile];
    [cp setEncryptionKey:@"Yourkey"];
    

    【讨论】:

      猜你喜欢
      • 2018-11-06
      • 1970-01-01
      • 2023-02-01
      • 2011-06-23
      • 1970-01-01
      • 1970-01-01
      • 2012-09-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多