Created
November 20, 2018 08:22
-
-
Save milannankov/a6bfb8f33174b6bd3031fc579861ab32 to your computer and use it in GitHub Desktop.
Hashing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static string GetHash(string xmlText) | |
{ | |
var xml = XElement.Parse(xmlText); | |
// Some xml operations omitted. | |
var xmlOutput = xml.ToString(); | |
var sha = new SHA512Managed(); | |
var hash = sha.ComputeHash(Encoding.UTF8.GetBytes(xmlOutput)); | |
return BitConverter.ToString(hash).Replace("-", String.Empty) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment