如何制作它,以便用户在分发时无法修改SQLite3数据库
I have created a python script that uses a database, which I have to pass in the file when compiling the .exe to a file. I would like to know if it is possible that the user to whom I give the file cannot edit the database (in a simple way)
I would like the file to be uneditable
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SQLite本身提供加密功能。但是它需要一些额外的许可证。
您可以检查Wiki: https://www.sqlite.org/请参阅/doc/preasure/www/readme.wiki
如果您可以保护加密密钥,则可以保护数据库文件。
过去,我曾经使用与Sqlite集成的See。使用数据运输应用程序时,对设备应用程序有帮助。
如果您想自己自定义加密,是的,可以检查一些OpenSource密码库以集成它。
SQLite provides encryption functionality by itself. But it need some extra licence.
You can check the wiki: https://www.sqlite.org/see/doc/release/www/readme.wiki
If you can protect the encryption key, you will be able to protect the db file.
In the past, I've ever use the SEE integrated with sqlite. It's helpful in device application when shipping the app with data.
If you want to customize the encryption yourself, yes, you can check some opensource cryptography library to integrate it.
可以使用
因此无法使本地文件完全不可编辑,
It would be possible to encrypt the file using a module like cryptography.
But a determined attacker will always manage to find the encryption key in the executable (and this would probably cause some problems in the code)
To my knowledge, it is not possible to make a local file completely uneditable