There are different techniques to hashing password string using different algorithm. In .net this can be done very easily using SHA256Managed class. Below is one simple utility function to hash password using SHA256 encryption.
This function return hashed data in Base64 form.
Example to hash password
public static string HashPassword(string plainMessage)
{
var data = Encoding.UTF8.GetBytes(plainMessage);
using (HashAlgorithm sha = new SHA256Managed())
{
sha.TransformFinalBlock(data, 0, data.Length);
return Convert.ToBase64String(sha.Hash);
}
}