Could you please tell me if the following is a good way to securely hash a password to be stored in a database:
public string CreateStrongHash(string textToHash) {
byte[] salt =System.Text.Encoding.ASCII.GetBytes("TeStSaLt");
Rfc2898DeriveBytes k1 = new Rfc2898DeriveBytes(textToHash, salt, 1000);
var encryptor = SHA512.Create();
var hash = encryptor.ComputeHash(k1.GetBytes(16));
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hash.Length; i++) {
sb.Append(hash[i].ToString("x2"));
}
return sb.ToString();
}
Many Thanks in advance.