Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created October 30, 2023 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/4d53bf79dda458569acabd0cf8b480e8 to your computer and use it in GitHub Desktop.
Save bjoerntx/4d53bf79dda458569acabd0cf8b480e8 to your computer and use it in GitHub Desktop.
private string CreateHash(string json)
{
using (SHA256 sha256Hash = SHA256.Create())
{
byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(json));
return BitConverter.ToString(bytes).Replace("-", "").ToLower();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment