1

I want to create a different project in .Net. That will be used for encryption and decryption of SQLite database. I am using this code for encryption, which is working:

SQLiteConnection cnn = new SQLiteConnection("Data Source=c:\\test.db3");
cnn.Open();
cnn.ChangePassword("mypassword");

But i want to decrypt the database and for that i am using this code for decryption:

SQLiteConnection cnn = new SQLiteConnection("DataSource=c:\\test.db3;Password=mypassword");

cnn.Open();
cnn.ChangePassword(null);

But the code cnn.ChangePassword(null); shows the below error:

   The call is ambiguous between the following methods or properties: 'System.Data.SQLite.SQLiteConnection.ChangePassword(byte[])' and 'System.Data.SQLite.SQLiteConnection.ChangePassword(string)' 

I found this useful link for the above code

http://gater3.rssing.com/chan-3257136/latest.php

but I don't where i am doing mistake.

Needs help.Thanks in advance.

1 Answer 1

2

Do try this first

cnn.ChangePassword(String.Empty);

then

cnn.ChangePassword((String)null);

or

cnn.ChangePassword(default(byte[]));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.