我的Python程序使用标准的Python SQLite数据库(导入sqlite3)。一切正常,我想加密数据库。我使用使用sqlitebrowser.org 3/4的DB浏览器(SQLCipher 3/4)打开它,并使用密钥( SQLCipher版本3)对其进行加密。我必须使用哪个库来重用它的大部分?
我知道我需要导入新的标准库(SQLCipher),并使用代码来用键连接数据库。如果有可能,我不想重写我的代码。怎么做?
发布于 2022-10-12 19:54:55
要在Python中管理加密的SQLite数据库:
pip install sqlcipher3数据库绑定。如果此操作失败,请自行构建和输入所有包:1. [Download SQLCipher](https://github.com/sqlcipher/sqlcipher).2. [Download SQLCipher3](https://github.com/coleifer/sqlcipher3).3. Copy "sqlite3.c" and "sqlite.h" from SQLCipher folder to SQLCipher3 folder.4. [Follow these steps](https://github.com/coleifer/sqlcipher3) to build SQLCipher3 package.5. Install the package using `pip install path/to/sqlcipher3`.https://stackoverflow.com/questions/74016675
复制相似问题