开发者

iPhone - Read password encrypted sqlite database

开发者 https://www.devze.com 2022-12-10 10:26 出处:网络
I can open a regular sqlite database on iPhone with开发者_C百科 sqlite3_open([filename UTF8String], &database);

I can open a regular sqlite database on iPhone with

开发者_C百科
sqlite3_open([filename UTF8String], &database);

But how do I open a password encrypted database?


Sqlite3 does not have builtin support for encryption. There is an extensions (CEROD) that support encryption, but the code is not publicly available, you need to license it. Apple has not, so the included version of sqlite3 does not support CEROD encrypted databases, if you have one you need to pay the licensing fee yourself, build a private copy of sqlite3 that included CEROD and use that.

If you are using CEROD and have built a custom sqlite3 supporting it then you would open the database like thing:

sqlite3_open(":cerod:%s:%s", [password UTF8String], [filename UTF8String], &database);

If you are not talking about CEROD then I have no idea what to tell you since, since any other encryption extensions are completely proprietary.

0

精彩评论

暂无评论...
验证码 换一张
取 消