Mask rows content in sql
Hello everybody, I've created a table to store login info created using windows form. The matter is that whenever i get in the database i can see user's password.
So i want password rows content to be replaced by * or # caracter.
Thx.
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Kirtan PatelRank #292 · 8.6K reputationPosted Sep 2, 2009, 5:20 PM EDT
private void button3_Click(object sender, EventArgs e)
{
string str = "kirtan";
MD5 md = new MD5CryptoServiceProvider();
byte[] bytesofString = ASCIIEncoding.Default.GetBytes(str);
byte[] EncodedBytes = md.ComputeHash(bytesofString);
MessageBox.Show(BitConverter.ToString(EncodedBytes));
}
Convert your data in Such a Format and Store in Database so that no one can read it :)
Kirtan PatelRank #292 · 8.6K reputationPosted Sep 2, 2009, 10:18 AM EDT
You can not mask Content of row like MS Access in SQL Server
but you can
Encrypt your Data in MD5/SHA or RSA or Similer like that which is not readable by anyone
Fiston17 reputationPosted Sep 2, 2009, 11:09 AM EDT
Fiston17 reputationPosted Sep 2, 2009, 6:28 PM EDT