作者:jxxpoo | 来源:互联网 | 2023-05-18 08:50
Heresthething:InmyQt4.6-Project,IuseaSQLite-Database.Thisdatabaseshouldntbeunencrypt
Here's the thing: In my Qt4.6-Project, I use a SQLite-Database. This database shouldn't be unencrypted on my harddrive. So I want, that on every start of my program, the user gets asked to enter a password to decrypt the database. Of course the database never should appear "in clear" (not encrypted) on my harddrive.
So is there any possibility to decrypt a SQLite-database "on the fly" and read and write data? What algorithm is here the best (maybe AES)?
When it's not possible (or very slow), maybe it's better to encrypt every string in the database and decrypt the string when the password was right (so that a user could open the database, but has no clue what all the entrys could mean)?
事情就是这样:在我的Qt4.6-Project中,我使用的是SQLite-Database。这个数据库不应该在我的硬盘上解密。所以我想,在程序的每次启动时,都会要求用户输入密码来解密数据库。当然,数据库永远不应该在我的硬盘上“清晰”(未加密)出现。那么有没有可能“动态”解密SQLite数据库并读写数据?什么算法最好(也许是AES)?当它不可能(或非常慢)时,也许最好加密数据库中的每个字符串并在密码正确时解密字符串(这样用户可以打开数据库,但不知道所有的意思可能意味着什么) ?
4 个解决方案