Is there a way to store the salt for this hash method? I dont know how to do it?
Thanks.
public void AddStudent(Student student)
{
student.StudentID = (++eCount).ToString();
student.Salt = GenerateSalt();
byte[] passwordHash = Hash(student.Password, student.Salt);
student.Password = Convert.ToBase64String(passwordHash);
student.TimeAdded = DateTime.Now;
students.Add(student);
}
This should be along the lines of what you want. Not sure where these Students are being stored, but it will likely need to be changed, too.