hello everyone:
I encryped password to the binary variable in sql server with this code:
DataClasses1DataContext db = new DataClasses1DataContext();
var info = new passdefine();
info.username = TextBox1.Text;
string strcry = TextBox2.Text;
byte[] bt = new byte[strcry.Length];
bt = System.Text.Encoding.UTF8.GetBytes(strcry);
RSACryptoServiceProvider RSA1 =new RSACryptoServiceProvider();
bt = RSA1.Encrypt(bt,false);
info.password = bt;
db.passdefines.InsertOnSubmit(info);
db.SubmitChanges();
And it worked properly but when Want to decrypt it , I get this error:BAD DATA.
And I use this code:
DataClasses1DataContext db=new DataClasses1DataContext();
...
Go to the complete details ...