A codec for Hexadecimal.

A codec for a hexadecimal string, Encode and Decode. Adds the extension method ToHexString to encode a byte array and ToHexBuffer to decode a hexadecimal string.

示例#1
0
 public void InvalidHexStrings()
 {
     ExceptionAssert.Throws <InvalidDataException>(() => HexString.Decode("0"));
     ExceptionAssert.Throws <InvalidDataException>(() => HexString.Decode("0Z"));
 }
示例#2
0
 public void InvalidFormatSpecifier()
 {
     ExceptionAssert.Throws <FormatException>(() => HexString.Encode(new byte[0], "..."));
 }