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); }
2022-09-15 12:53:15
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); }