开发者

Is there any better way to Encrypt SQL File?

Is there any better way to Encrypt SQL File ?

I am referring this article but not able to make settings. And second thing what this line is all about ?

sqlite3_exec(db, "PRAGMA key = 'BIGsecret', NULL, NULL, NULL);

How to write down in my source code.

If you have any other link regarding SQLite Encr开发者_Python百科yption. Please share.


There's the official SQL Encryption Extension, however that's source code you have to purchase (which then entitles you to support from the author) to add to the SqLite amalgamated source code, to embed inside your application. I'm not sure whether you want to have to do that - it sounds like you may be using a pre-built SQLite engine.

To answer your query about the sqlite3_exec() line, it's telling sqlite to execute some SQL code on the already-connected database 'db'. In this case, it is asking sqlite to set a run-time pragma (a database-specific setting called 'key') and telling it that the value of key is 'BIGsecret'. In other words, it's setting the decryption key for the database, which I guess you need to have set before you can query/use anything else in the encrypted database.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜