Encrypt Sqlite with Qt using some open source solution
My application is using Qt 4.6 to access sqlite. Now I have a requirement to encrypt sqlite database. On se开发者_运维问答arching i do find SEE but this is licensed.
My problem is: I want to encrypt sqlite database using QT or some open source solution that is compatible with Qt. Do tell me some link or tutorial if you know.
Sqlcipher SQLite extension is what you need. Look into QTCentre about building sqlite version which supports encryption out of the box. The main benefit of this version that it provides standard qt sql interface via custom plugin. Also, it is BSD-like licenced.
Not sure if this is a good solution, but how about encrypting the file before opening the database and encrypting it again after closing it?
In any case, I don't think there's any way to make the data 100% secure. There will always be a moment where the data will be unencrypted (when your app reads it) and anybody could retrieve it at that time.
精彩评论