C# Class HomeAutomation.Util.HexConverter

Converts between hex strings and byte arrays.
Mostra file Open project: moszinet/HomeAutomation

Public Methods

Method Description
BytesFromSpacedString ( this hexString ) : byte[]

Removes all spaces from hex string, and return the byte[] representation.

BytesFromString ( this hexString ) : byte[]

Parses the hex string and returns it's byte representation.

ToHexString ( this bytes ) : string

Converts the byte array to a simple non-spaced hex string.

ToHexString ( this bytes, int offset, int length ) : string

Converts the byte array to a simple non-spaced hex string.

ToSpacedHexString ( this bytes ) : string

Converts the byte array to a spaced hex string.

ToSpacedHexString ( this bytes, int offset, int length ) : string

Converts the byte array to a spaced hex string.

Method Details

BytesFromSpacedString() public static method

Removes all spaces from hex string, and return the byte[] representation.
public static BytesFromSpacedString ( this hexString ) : byte[]
hexString this
return byte[]

BytesFromString() public static method

Parses the hex string and returns it's byte representation.
public static BytesFromString ( this hexString ) : byte[]
hexString this
return byte[]

ToHexString() public static method

Converts the byte array to a simple non-spaced hex string.
public static ToHexString ( this bytes ) : string
bytes this
return string

ToHexString() public static method

Converts the byte array to a simple non-spaced hex string.
public static ToHexString ( this bytes, int offset, int length ) : string
bytes this
offset int
length int
return string

ToSpacedHexString() public static method

Converts the byte array to a spaced hex string.
public static ToSpacedHexString ( this bytes ) : string
bytes this
return string

ToSpacedHexString() public static method

Converts the byte array to a spaced hex string.
public static ToSpacedHexString ( this bytes, int offset, int length ) : string
bytes this
offset int
length int
return string