in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Encrypting, decrypting and attaching to encrypted databases

Last post 12-15-2011 7:24 AM by madrox. 36 replies.
Page 2 of 3 (37 items) < Previous 1 2 3 Next >
Sort Posts: Previous Next
  • 06-30-2008 4:59 PM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    Give a message where?  If you want to pop open a message box on the screen, that's up to you.  The provider itself has no user interface -- nor should it.

  • 06-30-2008 5:10 PM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    ya i wona popup a message box >>> the resone is that the (ChangePassword ) dont give a value

  • 06-30-2008 5:31 PM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    Sorry >>>>>> ya i wona popup a message box >>> the resone is that the (ChangePassword ) dont produce a value

  • 06-30-2008 7:29 PM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    Sorry the SQLite data provider is not a UI component and I cannot put a message box up on the screen.  If the provider fails to change the password or an error occurs, it'll be thrown as an exception for you to catch.

    This provider is used in ASP.NET, windows services, and other components that do not interact with the desktop.  Popping up a message box when that function is called is not an option.

  • 07-05-2008 3:14 PM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    well .. i manege to popup a msg box after closing the connection, although thats not what wont bute it will do the job.

    Thanks

    ------------------------------------

    one more thing ............. is it possible to check if the db is password protected before throwing an exception ??

  • 07-05-2008 6:48 PM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    Unfortunately the entire file, including all metadata is encrypted ... without a password, the sqlite engine can't even tell if its a sqlite database.

     

  • 07-06-2008 1:04 AM In reply to

    • Seth
    • Top 500 Contributor
    • Joined on 11-13-2007
    • Posts 6

    Re: Encrypting, decrypting and attaching to encrypted databases

     Hi,

     

    So the enryption is a good protection for the data ?

  • 07-09-2008 11:05 PM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    It's reasonably good.  It's an RC4 algorithm, which is weaker than some, but not as weak as others.  Remember that nothing stored on a user's machine is ever truly secure.

     

  • 07-10-2008 9:45 AM In reply to

    • Seth
    • Top 500 Contributor
    • Joined on 11-13-2007
    • Posts 6

    Re: Encrypting, decrypting and attaching to encrypted databases

     Thanks

  • 07-10-2008 8:54 PM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    Hi all....

    i did a small app for encrypting, decrypting and compressing a sqlite database

    hop u find it useful

  • 09-23-2009 6:10 AM In reply to

    • Prachi
    • Top 150 Contributor
    • Joined on 09-10-2009
    • Posts 9

    Re: Encrypting, decrypting and attaching to encrypted databases

    CAn anyone give me a small sample code in .NET which connects to encrypted database ( Password set to database) and opens connection. I tried above code but it gives me error :- " File opened that is not a database file file is encrypted or is not a database " How the connection string should be passed and how to decrypt the database which is encrypted ?
  • 01-04-2010 8:03 AM In reply to

    • flater
    • Not Ranked
    • Joined on 01-04-2010
    • Posts 2

    Re: Encrypting, decrypting and attaching to encrypted databases

     In the original example, you say you can decrypt a database by supplying the following command:

     </p><p>conn.ChangePassword(null);</p><p>&nbsp;

    But when I try this, it doesn't work because it is an ambiguous call. Besides the (string) argument there is 1 overload with a byte[ argument on this method, which causes this.

     

    Please advise how to continue!

  • 01-05-2010 3:25 AM In reply to

    • flater
    • Not Ranked
    • Joined on 01-04-2010
    • Posts 2

    Re: Encrypting, decrypting and attaching to encrypted databases

    Solved it by using:

     conn.ChangePassword(null as String);

     this will choose the right method.

  • 01-10-2011 2:39 AM In reply to

    • diizii
    • Not Ranked
    • Joined on 08-14-2010
    • Posts 1

    Re: Encrypting, decrypting and attaching to encrypted databases

    I'm using Visual Basic 2008 and aslo get error. Solved it by using:


    </p><p>conn.ChangePassword(System.DBNull.Value.ToString)
    </p><p>

  • 01-11-2011 4:25 AM In reply to

    Re: Encrypting, decrypting and attaching to encrypted databases

    I have successfully encrypted database using password. I have also download SQLite2009 Pro to open encrypted database. This tools asks for password and opens database. But, it  uses my password to decrypt the database. So, I cannot ensure that the database data is encrypted (as data is automatically decrypted). I cannot see encyrpted data (I know this is what we want).

    But, How can I ensure that encryption is performed correctly.

    Filed under:
Page 2 of 3 (37 items) < Previous 1 2 3 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems