public static string GetSha256Hash(this byte[] bytes) { using (SHA256 sha256Alg = SHA256.Create()) { return BytesToHexString(sha256Alg.ComputeHash(bytes)); } }