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-12-02 12:44:06
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); }