4
Answers

Mask rows content in sql

Fiston

Fiston

15y
2.7k
1
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.
Answers (4)
0
Kirtan Patel
NA 35k 2.8m 15y
Hi Here Is Example How to Encrypt Data in MD5  From String



  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 :)




Accepted
0
Fiston
NA 30 22.9k 15y
Thank you even if you forgot to tell me the namespace to include first. I did it, Thx.
0
Fiston
NA 30 22.9k 15y
Thx, But how can i manage the system you talked about. Thx again.
0
Kirtan Patel
NA 35k 2.8m 15y
Hi Friend

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