问题标签 [pysqlcipher]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Unable to open pysqlcipher-encrypted dictionary in command-line sqlcipher tool
I am able to create an encrypted database using pysqlcipher, and open it with pysqlcipher, but somehow I cannot open the same database using the sqlcipher
command0line tool installed on Mac OS X when installing sqlcipher from source. For installation, I followed the steps listed here: https://github.com/leapcode/pysqlcipher/issues/17#issuecomment-113776360 and the versions of libsqlcipher
should therefore be the same in both cases.
Test script
Output
This part is as expected. Output of hexdump
also confirms that the database is, in fact, encrypted:
Now, I attempt to open the test.db
file using the sqlcipher command-line tool:
As a final test, I created an encrypted database from the sqlcipher command-line tool, using the same key. I would expect this database to be exactly the same as the one created by the Python script (is this a reasonable expectation? Maybe they could be different):
A hexdump confirms that they are not the same:
I'm not sure whether this is an error on my side, or a problem with the pysqlcipher
library. I opened an issue to be safe, but any advice would be greatly appreciated!
python - 如何在 Django 中使用 pysqlcipher?
我想使用 sqlcipher 及其 python 绑定 pysqlcipher ( https://pypi.python.org/pypi/pysqlcipher ) 来加密 Django 使用的 sqlite3 数据库。
在 Django 中实现这一点的最佳方法是什么?它是否可行?你会通过信号、路由器或……其他方式来实现吗?我从未接触过 Django 与其数据库交互的方式,因此任何建议都将受到高度赞赏。
有一个名为 django-sqlcipher ( https://github.com/codasus/django-sqlcipher ) 的软件包,但我没有设法让它工作,考虑到这个软件包的阶段,我不确定这是否可行。
django - 将djpeewee集成到django中加密sqlite3数据库
我想加密我的 Django 项目使用的 sqlite3 数据库。为此,我想使用 pysqlcipher。
由于我还没有找到任何方法可以轻松地将 pysqlcipher 与 Django 集成,我开始想知道是否可以将 Djpeewee 集成到我现有的 Django 项目中,然后通过 Djpeewee 加密和解密我的 sqlite3 数据库,因为最初 PeeWee 支持 sqlcipher 加密。
这可能吗?
python - 如何为 Windows 构建 SQL Cipher Python 绑定
我无法在我的 Windows 机器上为 SQL 密码构建 python 绑定。我已经成功地为 Macintosh 构建了 python 绑定。我想在 Mac 和 PC 上使用我的 python 脚本。
我是 python 新手,不完全理解它为什么会失败,但我开始尝试调试setup.py
脚本,发现错误出现build_extension(self, ext)
在第 147 行的方法中。
我采取的构建步骤:
- https://github.com/rigglemania/pysqlcipher3
- https://github.com/sqlcipher/sqlcipher
- http://www.jerryrw.com/howtocompile.php
我克隆了上面的 repos 并按照 Jerry 的说明构建 sqlcipher。我把 sqlite3.c 和 sqlite3.h 文件放在你的合并文件夹中,然后我尝试构建合并。我得到了下面的错误。我试图构建,但也失败了同样的错误。
错误:
问题:
- 有什么方法可以在我的 Mac 上构建 sqlcipher 并将其用于 PC?(将文件从 MAC 传输到 PC)?
- 有人可以帮我为 PC 构建 sqlcipher3 python 绑定吗?
我是 python 新手,任何帮助将不胜感激。
python-2.7 - 如何让 Pysqlcipher 在安装过程中检测 openssl
我正在尝试安装 pysqlcipher 以使我能够在 python 中使用 sqlcipher 函数。安装 pysqlcipher 时出现错误提示
致命错误:无法检测到 OpenSSL!
然后我尝试安装openssl
我收到一条成功的消息
成功安装cffi-1.6.0 cryptography-1.3.2 enum34-1.1.6 idna-2.1 ipadd ress-1.0.16 pyasn1-0.1.9 pycparser-2.14 pyopenssl-16.0.0 6-1.10.0
然后我尝试重新安装 pysqlcipher
安装过程中出现同样的错误。
致命错误:无法检测到 OpenSSL!
如何让它检测openssl?
请注意,我在 Windows 7 上安装它
python - 加密 Python Tkinter 应用程序的 sqlite 表 - pysqlcipher?它如何安全?
我制作了一个 tkinter 桌面应用程序,并且我有一个以auth
单行命名的表,其中包含敏感的 API 凭据。我的想法是使用pysqlcipher
( link ) 或等效方法加密此表。
根据文档,您必须PRAGMA key
在进行任何操作之前通过。如果有人反编译了我的应用程序的 .exe 版本,他们难道不能在源代码中找到这个密钥,然后从那里解密数据库吗?如果是这样,在桌面应用程序中保护敏感 API 凭据的常见解决方案是什么?
我的 sqlite 表结构:
免责声明:我不是安全或加密专家,但我非常愿意探索和学习所有选项。
python - 'sqlite3.h':没有这样的文件或目录
我正在尝试在我的计算机上安装pysqlite
模块。我发出了以下命令:Python 2.7
Windows 10
安装照常运行,直到遇到错误:
c:\users\xaresys\appdata\local\temp\pip-build-xleoab\pysqlite\src\connection.h(33):致命错误 C1083:无法打开包含文件:'sqlite3.h':没有这样的文件或目录错误:命令 'C:\Users\xaresys\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' 失败,退出状态为 2
我还尝试安装一个类似的模块pysqlcipher
,它遇到了同样的错误。在安装之前我需要安装任何东西吗?谢谢。
python - 在 Python 中访问加密的 SQLite3 数据库(我有密钥)
如果它是多余的,我深表歉意,但我似乎无法在任何地方找到答案。我使用 SQLite3 的数据库浏览器为我的数据库设置了密码(加密密钥)。它使用 sqlcipher。现在我无法访问它。我无法提供密码\密钥。这是我的代码:
我的平台是Windows。我试过pysqlcipher,它没有安装会引发错误。我该如何从这里开始?我应该怎么办?我的目标是由于一些明显的原因使我的数据库文件不可读。
我收到以下错误:c.execute("SELECT * FROM Item") sqlite3.DatabaseError: file is encrypted or is not a database
python-3.x - 如何使用 Python 和 sqlite 加密数据库?
我有一个使用 Flask、python3、sqlite 和 sqlalchemy 的网络应用程序,但在部署之前,我想加密数据库的内容。我已经用谷歌搜索并在这里阅读了 pysqlcipher 是要走的路(如果这是不正确的,很高兴选择另一个选项)但是我在第一个障碍中跌倒了:
然后在python3中尝试:
我找不到开始的说明或简单示例。有任何想法吗?
python - 在 Windows 10 上使用 Python 3.7 时出现“ModuleNotFoundError: No module named 'pysqlcipher3'”错误
我正在尝试使用 Python 3.7 解密一个数据库文件。要解密它,我必须使用pysqlcipher3
python 3.7 的版本。要安装它,我尝试使用这两个命令:
和
并且这两个命令都显示成功安装了pysqlcipher
软件包。但是,当我尝试pysqlcipher3
使用此行导入我的 Python 项目时:
它显示此错误:
我检查了各种 GitHub 项目,但没有一个提供明确的工作解决方案。Python 软件包网站说要安装libsqlcipher
在您的操作系统中,但这次问题是一样的,没有关于安装libsqlcipher
Windows 10 的文档和链接。任何人都可以为我提供正确的安装步骤,或任何文档,或任何视频教程,关于相同?还是import语句有问题?