1024programmer Blog Qt’s SQLite database encryption_qt sqlite data encryption_Yingluo qc’s blog

Qt’s SQLite database encryption_qt sqlite data encryption_Yingluo qc’s blog

class=”markdown_views prism-dracula”>

Article directory

sqlite database encryption

There are two ways to encrypt the database:

  1. Encrypt the content and then write it into the database: This method is simple to use. You only need to perform corresponding encryption and decryption operations on the fields when entering/exiting the database, which solves the problem of nakedly exposing the data to a certain extent. question. However, this method is not completely encrypted, because information such as the table structure of the database can still be viewed. In addition, after the content written to the database is encrypted, searching is also a problem.

  2. Encrypt the database file: Encrypt the entire file of the entire database. This method can basically solve the information security problem of the database. The existing SQLite encryption is basically implemented in this way.

QtCipherSqlitePlugin plugin encrypts sqlite database

QtCipherSqlitePlugin-GITHUB address

devbean compiles the QtCipherSqlitePlugin plugin

The downloaded file contains the source file compiled by QtCipherSqlitePlugin and the test program file

sqlitecipher: the source code folder of the plug-in compiled library file
test: the test program folder

Insert picture description here

Compile

  • Enter the downloaded folder and use Qt Creator to build the source file (be careful not to run it, because the library file is generated directly)
  • After compiling, the sqlitecipher.dll and sqlitecipherd.dll files are generated, corresponding to the libraries under the debug and release versions respectively;
  • Copy the dynamic library file to the Qt plugin directory plugins/sqldrivers
    Insert picture description here

use

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/qts-sqlite-database-encryption_qt-sqlite-data-encryption_yingluo-qcs-blog/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索