問題描述
我如何創建一個加密的 SQLite 數據庫,該數據庫實際上保持加密狀態或之后可以打開.
How can I create an encrypted SQLite database that actually stays encrypted or that I can open afterwards.
我使用了可以"創建加密數據庫的 SQLite2009 Pro Enterprise Manager,但在輸入加密密鑰后,它們無法再打開.
I used SQLite2009 Pro Enterprise Manager that "can" create encrypted databases, but after typing in the encryption key they are no longer openable.
我使用 SQLabs 的 SQLiteManager 創建了一個加密數據庫,雖然這個數據庫可以在之后打開,但可以通過任何 SQLite 管理工具或代碼完成,而無需我輸入的密鑰.
I used SQLiteManager from SQLabs to create an encrypted database and while this one can be opened afterwards, this can be done from any SQLite management tool or code without requiring the key I entered.
那么,請問如何創建加密的 SQLite 數據庫?
So, how the heck can you create an encrypted SQLite database please?
我計劃在 Adob??e Flex 應用程序中使用該數據庫.
I plan to use the database in an Adobe Flex aplication.
謝謝.
推薦答案
SQLite 支持集成加密,但默認的開源 SQLite 發行版不支持加密.加密版本的 SQLite 只能在不同客戶端或工具之間移植,前提是它們都使用相同的加密擴展.
SQLite supports integrating encryption but the default open-source SQLite distribution does not support encryption. Encrypted versions of SQLite are only going to be portable across different clients or tools if they all use the same encryption extension.
SQLite 開發人員自己分發支持透明加密的商業版本的 SQLite.當此模塊用于加密時,加密跨平臺工作,寫入文件的每個字節都被加密.存儲在磁盤上的加密 SQLite 文件中沒有任何內容表明它是 SQLite 數據庫.許多工具通過允許您放入商業 sqlite.dll 文件來代替開源文件來支持這種實現.
The SQLite developers themselves distribute a commercial version of SQLite that supports encryption transparently. When this module is used for encryption, the encryption works across platforms and every byte written to the file is encrypted. There is nothing in an encrypted SQLite file stored on disk to even indicate it's a SQLite database. Many tools support this implementation by allowing you to drop in the commercial sqlite.dll file in place of the open-source one.
還有支持加密的第三方擴展.例如,System.Data.SQLite 支持加密,但使用 .NET 庫來這樣做,因此加密的 System.Data.SQLite 只能由另一個也使用 System.Data.SQLite 的客戶端讀取(這是故意的,出于尊重核心 SQLite 開發人員及其商業產品).
There are also third party extensions that support encryption. For example, System.Data.SQLite supports encryption but utilizes .NET libraries to do so and thus an encrypted System.Data.SQLite can only be read by another client that also uses System.Data.SQLite (this is on purpose, out of deference to the core SQLite developers and their commercial product).
Adobe AIR 1.5 支持加密.我不確定使用哪種機制,但我搜索并找不到答案.AIR 加密數據庫可能只能使用 AIR 讀取.兩種方式我都不確定.但是,這里是學習使用加密數據庫的一個很好的起點是 AIR:
Adobe AIR 1.5 support encryption. I don't know for sure which mechanism is used though, I searched and couldn't find the answer. It's possible that an AIR encrypted database can only be read with AIR. I don't know definitively either way. However, here is a good starting point for learning about working with encrypted databases is AIR:
http://probertson.com/articles/2008/11/18/air-1_5-encrypted-sqlite-database-how-to/
這篇關于SQLite - 創建加密數據庫.怎么……?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!