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
ファイル: HexStringTest.cs プロジェクト: wizd/net-ipfs-core
 public void InvalidHexStrings()
 {
     ExceptionAssert.Throws <InvalidDataException>(() => HexString.Decode("0"));
     ExceptionAssert.Throws <InvalidDataException>(() => HexString.Decode("0Z"));
 }
コード例 #2
0
ファイル: HexStringTest.cs プロジェクト: wizd/net-ipfs-core
 public void InvalidFormatSpecifier()
 {
     ExceptionAssert.Throws <FormatException>(() => HexString.Encode(new byte[0], "..."));
 }