Encrypted file or db in python(python中的加密文件或数据库)
问题描述
我有一个在 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中的加密文件或数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:python中的加密文件或数据库


基础教程推荐
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01