简体   繁体   English

如何在iPhone中处理加密的sqlite数据库?

[英]how to deal with encrypted sqlite database in iPhone?

I have an encrypted version of an sqlite database and also I have the KEY but honestly I have no idea about using it or how to get the data from the encrypted database? 我有一个sqlite数据库的加密版本,也有KEY但是老实说,我不知道如何使用它或如何从加密数据库中获取数据?

I guess the solution somewhere in the open function? 我猜该解决方案在打开功能的某处?

 if(sqlite3_open([_dbPath UTF8String],&database)==SQLITE_OK);

Can anybody help me?? 有谁能够帮助我??

The core SQLite database implementation does not itself provide encryption support. 核心SQLite数据库实现本身并不提供加密支持。 There does however exist a number of extensions for adding encryption to SQLite. 但是,确实存在许多用于向SQLite添加加密的扩展。 Some of these encrypt the entire database file while some other only encrypt the contents of the tables. 其中一些加密整个数据库文件,而另一些仅加密表的内容。

These extensions are for the most part not compatible, so you will most likely have to use the same extension on the iPhone as the one used on C#. 这些扩展在大多数情况下不兼容,因此您很可能必须在iPhone上使用与C#上使用的扩展相同的扩展。 And if you're lucky that extension is also supported on iOS. 而且,如果您很幸运,iOS上也支持该扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM