Tag Archives: byte array to hexadecimal string

Convert between byte arrays and hexadecimal strings in C#

This example uses extension methods to convert between byte arrays and hexadecimal strings. It adds a ToHex extension method to the byte[] type and a ToBytes extension method to the string class. To create an extension method, create a public … Continue reading

Posted in algorithms, cryptography, extensions, strings | Tagged , , , , , , , , , , , , , , , | 2 Comments