public static string SHA256Hash(string str) { byte[] data = Encoding.UTF8.GetBytes(str); SHA256 shaM = new SHA256Managed(); var hashBytes = shaM.ComputeHash(data); return Convert.ToBase64String(hashBytes); }
public static string SHA256Hash(string str) { byte[] data = Encoding.UTF8.GetBytes(str); SHA256 shaM = new SHA256Managed(); var hashBytes = shaM.ComputeHash(data); return Convert.ToBase64String(hashBytes); }