简体   繁体   English

加密/隐藏 sqlite3 数据库(Tkinter 和 Python)

[英]Encrypt/Hide sqlite3 database (Tkinter & Python)

I am currently working on a password saving application using tkinter, and I don't want the database to be visible/accesible from the computer's local storage.我目前正在使用 tkinter 开发密码保存应用程序,我不希望数据库从计算机的本地存储中可见/可访问。 Is there a way to achieve this with a pre-existing python library, or do I have to pay for a service?有没有办法使用预先存在的 python 库实现此目的,或者我是否必须为服务付费?

You can try encrypting your database.您可以尝试加密您的数据库。 I'm fairly sure sqlite doesn't offer encryption by default, you might need an extension like SQLCipher.我相当确定 sqlite 默认不提供加密,您可能需要像 SQLCipher 这样的扩展。

If you are looking for a password verification system, you could use one-way hashes like Sha256 or a salted algorithm.如果您正在寻找密码验证系统,您可以使用单向哈希,如 Sha256 或加盐算法。 If you need a password manager, you could use PyCryptoDomex to encrypt the user's password with a "master key" that the user has to remember.如果您需要密码管理器,您可以使用 PyCryptoDomex 使用用户必须记住的“主密钥”来加密用户的密码。 Then when you want to fetch a passcode, ask them for the master key again and use it to decrypt the password.然后,当您想获取密码时,再次向他们询问主密钥并使用它来解密密码。

you can use Sqlite3En package or SQLCipher Sqlite3En doc:您可以使用 Sqlite3En package 或 SQLCipher Sqlite3En 文档:

https://github.com/yous1010/Sqlite3En_python/tree/master https://github.com/yous1010/Sqlite3En_python/tree/master

SQLCipher: SQL密码:

https://www.zetetic.net/sqlcipher/ https://www.zetetic.net/sqlcipher/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM