问题描述
我有一个在 python 中插入/选择的 sqlite3 db.该应用程序运行良好,但我想对其进行调整,以便没有密码就无法从数据库中读取数据.我怎么能在python中做到这一点?请注意,我不知道从哪里开始.
I have a sqlite3 db which i insert/select from in python. The app works great but i want to tweak it so no one can read from the DB without a password. How can i do this in python? note i have no idea where to start.
推荐答案
您可以使用 SQLCipher.
You can use SQLCipher.
http://sqlcipher.net/
SQLite 的开源全数据库加密
Open Source Full Database Encryption for SQLite
SQLCipher 是一个 SQLite 扩展,它为数据库文件提供透明的 256 位 AES 加密.页面在写入磁盘之前被加密,并在读回时被解密.由于占用空间小且性能卓越,因此非常适合保护嵌入式应用程序数据库,也非常适合移动开发.
SQLCipher is an SQLite extension that provides transparent 256-bit AES encryption of database files. Pages are encrypted before being written to disk and are decrypted when read back. Due to the small footprint and great performance it’s ideal for protecting embedded application databases and is well suited for mobile development.
- 极快的性能,只需 5-15% 的开销对许多操作进行加密
- 数据库文件中的数据 100% 已加密 使用良好的安全性实践(CBC 模式,密钥派生)
- 零配置和应用级密码学广泛的平台
- 支持:适用于 C/C++、Obj-C、QT、Win32/.NET、Java、Python、Windows、Linux、iPhone/iOS 上的 Ruby 等……
这篇关于python中的加密文件或数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)