Closed DarrenOosthuizen closed 3 years ago
Hi There
Please finish all the methods needed on the frmLoginScreen
Please implement the following
public String CreateSHA256Hash(string input, string salt) { byte[] bytes = Encoding.UTF8.GetBytes(input + salt); SHA256Managed sha256hashstring = new SHA256Managed(); byte[] hash = sha256hashstring.ComputeHash(bytes); return ByteArrayToStrng(hash); }
``` private static string ByteArrayToStrng(byte[] ba) { StringBuilder hex = new StringBuilder(ba.Length * 2); foreach (byte b in ba) { hex.AppendFormat("{0:x2}", b); } return hex.ToString(); }
Hey,
all done.
Hi There
Please finish all the methods needed on the frmLoginScreen
Please implement the following
So when you retrieve the user salt from tblUser run the CreateSH256Hash with the password and salt as input
Then take the return string and match it against the password in the record