public void EncodeToBuffer() { var buffer = new char[bytes.Length * 2]; HexEncoder.Encode(bytes, buffer); Assert.Equal(hex, new string(buffer)); }
public void DecodeToBuffer() { var buffer = new byte[bytes.Length]; HexEncoder.Decode(hex, buffer); Assert.Equal(bytes, buffer); HexEncoder.Decode(hex.ToLowerInvariant(), buffer); Assert.Equal(bytes, buffer); }
public void Decode() { Assert.Equal(bytes, HexEncoder.Decode(hex)); Assert.Equal(bytes, HexEncoder.Decode(hex.ToLowerInvariant())); }
public void Encode() { Assert.Equal(hex, HexEncoder.Encode(bytes)); }