当前位置:网站首页>SQLite3 encrypted version
SQLite3 encrypted version
2022-04-23 06:44:00 【The old man is outside the door】
sqlite3 Encrypted version
1.lib、dll stay github Download address on
https://github.com/rindeal/SQLite3-Encryption
2. Description of encryption interface
// Decryption or for the first encryption
int sqlite3_key(sqlite3 *db, const void *zKey, int nKey);
// Reset password
int sqlite3_rekey(sqlite3 *db, const void *zKey, int nKey);
sqlite3_key Yes, enter the key , If the database is encrypted, you must execute this function and enter the correct key before you can operate ; If the database is not encrypted , After executing this function, the database operation will appear “ This database is encrypted or not a database file (file is encrypted or is not a database)” Error of .
int sqlite3_key( sqlite3 *db, const void *pKey, int nKey),
db Is the specified database ,pKey It's the key ,nKey It's the key length .
sqlite3_rekey Is to change the key or add the key to the database without encryption or empty the key , Before changing the key or emptying the key, it must be executed correctly sqlite3_key. In the correct implementation sqlite3_rekey After the sqlite3_close Before closing the database, you can operate the database normally , No more execution sqlite3_key.
int sqlite3_rekey( sqlite3 *db, const void *pKey, int nKey), The parameters are the same as above .
// Detailed instructions
1. Add database password : If you want to add a password , After creating the database file , Call... Any time before closing the database file sqlite3_key Function
2. Read database data : After opening the data file , call sqlite3_key function , that will do ( If the database is not encrypted , After executing this function, the database operation will appear “ This database is encrypted or not a database file ” Error of ; After testing , The password can only be set when creating a new database !)
3. Change database password : First, you need to use the current password to open the database correctly , Then you can call sqlite3_rekey(db,"112233",6) To change the database password .
4. Delete database password : First, you need to use the current password to open the database correctly , Then you can call sqlite3_rekey(db,"112233",6) To delete the database password .
Reference resources :
1.https://blog.csdn.net/Best_ZYJ/article/details/102483847
2.https://blog.csdn.net/weixin_33770878/article/details/94542946?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0.pc_relevant_paycolumn_v3&spm=1001.2101.3001.4242.1&utm_relevant_index=3
版权声明
本文为[The old man is outside the door]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230548038789.html
边栏推荐
- WMI技术介绍和应用
- Graduation project, curriculum link, student achievement evaluation system
- Quaternion multiplication
- [UDS unified diagnostic service] IV. typical diagnostic service (5) - function / component test function unit (routine function unit 0x31)
- File viewing commands and user management commands
- Camera calibration: key point method vs direct method
- LaTeX配置与使用
- 【UDS统一诊断服务】五、诊断应用示例:Flash Bootloader
- ARM常用汇编指令
- 静态成员
猜你喜欢
![[UDS unified diagnosis service] i. diagnosis overview (2) - main diagnosis protocols (K-line and can)](/img/ec/9b783b6dca5684684485e3b9fc6846.png)
[UDS unified diagnosis service] i. diagnosis overview (2) - main diagnosis protocols (K-line and can)

HDU-Tunnel Warfare

PN结、二极管原理详解与应用
![[UDS unified diagnosis service] IV. typical diagnosis service (3) - read fault information function unit (storage data transmission function unit)](/img/10/bd39bb03f5456a412650596208a391.png)
[UDS unified diagnosis service] IV. typical diagnosis service (3) - read fault information function unit (storage data transmission function unit)

在visual stdio中运行qt程序
![[UDS unified diagnostic service] III. application layer protocol (1)](/img/e7/813e29a30e08eb92ccc836743be9aa.png)
[UDS unified diagnostic service] III. application layer protocol (1)

拷贝构造函数

QT icon application

File viewing commands and user management commands
![[UDS unified diagnostic service] II. Network layer protocol (2) - data transmission rules (single frame and multi frame)](/img/4f/315a9b4cd85ebaad39cfa985dea45b.png)
[UDS unified diagnostic service] II. Network layer protocol (2) - data transmission rules (single frame and multi frame)
随机推荐
[ThreadX] h743zi + lan8720 + ThreadX + netx duo transplantation
C语言实现memcpy、memset、strcpy、strncpy、strcmp、strncmp、strlen
Generate shortcut
Running QT program in visual Stdio
2020 Jiangsu Collegiate Programming Contest-A.Array
PM2 deploy nuxt related commands
汇编 32位无符号加法计算器
【UDS统一诊断服务】二、网络层协议(1)— 网络层概述与功能
[opencv] use filestorage to read and write eigenvectors
友元函数,友元类,类模板
[UDS unified diagnostic service] IV. typical diagnostic service (5) - function / component test function unit (routine function unit 0x31)
_findnext 报错
【UDS统一诊断服务】(补充)五、ECU bootloader开发要点详解 (1)
2022LDU寒假训练-程序补丁
Vscode custom comments
C [document operation] PDF files and pictures are converted to each other
日志写法(带时间)
[UDS unified diagnosis service] IV. typical diagnosis service (1) - diagnosis and communication management function unit
[stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
[UDS unified diagnosis service] i. diagnosis overview (1) - diagnosis overview