Skip to content

Instantly share code, notes, and snippets.

@thinktainer
Created January 24, 2014 20:47
Show Gist options
  • Save thinktainer/8606058 to your computer and use it in GitHub Desktop.
Save thinktainer/8606058 to your computer and use it in GitHub Desktop.
format hex string from byte array c#
// Loop through each byte of the hashed data
// and format each one as a hexadecimal string.
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment