Encrypt SQLite database in C#

I recommend using the System.Data.Sqlite wrapper, which includes encryption. It works great, it's easy to use, and it's a complete ADO.Net implementation. You can get the wrapper from https://system.data.sqlite.org, and the developer describes how to use the encryption on this forum at: https://web.archive.org/web/20100207030625/http://sqlite.phxsoftware.com/forums/t/130.aspx. Hint - you just set the password property. He also describes how he does the encryption using the Microsoft Crypto API elsewhere in the forum.


Take a look at:

http://zetetic.net/software/sqlcipher

It is open source.

You can chek also the code for the wxsqlite3.


I would try http://code.google.com/p/csharp-sqlite/, it's rewrite of SQLite 3.6.16 in C#, under MIT License. I suppose it will be easy to tweak it.

EDIT: As mentioned in the note below, it also support sqlcipher encryption

UPDATE: Since Google Code went read only the project has moved to it's own website https://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki