带有加密/密码保护的 SQLite

2021-12-08 00:00:00 encryption password-protection sqlite

我刚刚在学习使用 SQLite,我很好奇这是否可行:

I'm just learning to use SQLite and I was curious if such is possible:

  1. 数据库文件的加密?

  1. Encryption of the database file?

密码保护打开数据库?

附注.我知道有这个SQLite 加密扩展 (SEE)",但根据文档,SEE 是许可软件......"和SEE 的永久源代码许可的成本是 2000 美元."

PS. I know that there is this "SQLite Encryption Extension (SEE).", but according to the documentation, "The SEE is licensed software...." and "The cost of a perpetual source code license for SEE is US $2000."

推荐答案

SQLite 内置了用于加密的钩子,这些钩子在正态分布中不使用,但这里有一些我知道的实现:

SQLite has hooks built-in for encryption which are not used in the normal distribution, but here are a few implementations I know of:

  • SEE - 官方实现.
  • wxSQLite - 一个 wxWidgets 风格的 C++ 包装器,也实现了 SQLite 的加密.
  • SQLCipher - 使用 openSSL 的 libcrypto 来实现.
  • SQLiteCrypt - 自定义实现,修改后的 API.
  • botansqlite3 - botansqlite3 是 SQLite3 的加密编解码器,可以使用 Botan 中的任何算法进行加密.
  • sqleet - 另一个加密实现,使用 ChaCha20/Poly1305 原语.请注意,上面提到的 wxSQLite 可以将其用作加密提供程序.
  • SEE - The official implementation.
  • wxSQLite - A wxWidgets style C++ wrapper that also implements SQLite's encryption.
  • SQLCipher - Uses openSSL's libcrypto to implement.
  • SQLiteCrypt - Custom implementation, modified API.
  • botansqlite3 - botansqlite3 is an encryption codec for SQLite3 that can use any algorithms in Botan for encryption.
  • sqleet - another encryption implementation, using ChaCha20/Poly1305 primitives. Note that wxSQLite mentioned above can use this as a crypto provider.

SEE 和 SQLiteCrypt 需要购买许可证.

The SEE and SQLiteCrypt require the purchase of a license.

披露:我创建了 botansqlite3.

Disclosure: I created botansqlite3.

相关文章