I am currently working on a visual studio C# windows form project. However, I am confused by how SHA256 + salted works. I found some examples online but unable to understand how
For the first question look at CC Inc's answer.
To the second point:
MessageBox.Show(sha256encrypt(textBox1.Text, "SampleUserName"));
3) Yes, it is.
You can compare two strings with the ==
comparator or string.Equals()
.
public bool compareHashs(string hash1, string hash2){
if(hash1.Equals(hash2) //or hash1 == hash2
return true;
}else{
return false;
}
}