我有一个在 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.
这篇关于python中的加密文件或数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!