C# Class dotGit.Generic.HexEncoding

Summary description for HexEncoding.
Afficher le fichier Open project: schacon/dotgit Class Usage Examples

Méthodes publiques

Méthode Description
GetByteCount ( string hexString ) : int
GetBytes ( string hexString, int &discarded ) : byte[]

Creates a byte array from the hexadecimal string. Each two characters are combined to create one byte. First two hexadecimal characters become first byte in returned array. Non-hexadecimal characters are ignored.

HexEncoding ( ) : System
InHexFormat ( string hexString ) : bool

Determines if given string is in proper hexadecimal string format

IsHexDigit ( Char c ) : bool

Returns true is c is a hexadecimal digit (A-F, a-f, 0-9)

ToString ( byte bytes ) : string

Private Methods

Méthode Description
HexToByte ( string hex ) : byte

Converts 1 or 2 character string into equivalant byte value

Method Details

GetByteCount() public static méthode

public static GetByteCount ( string hexString ) : int
hexString string
Résultat int

GetBytes() public static méthode

Creates a byte array from the hexadecimal string. Each two characters are combined to create one byte. First two hexadecimal characters become first byte in returned array. Non-hexadecimal characters are ignored.
public static GetBytes ( string hexString, int &discarded ) : byte[]
hexString string string to convert to byte array
discarded int number of characters in string ignored
Résultat byte[]

HexEncoding() public méthode

public HexEncoding ( ) : System
Résultat System

InHexFormat() public static méthode

Determines if given string is in proper hexadecimal string format
public static InHexFormat ( string hexString ) : bool
hexString string
Résultat bool

IsHexDigit() public static méthode

Returns true is c is a hexadecimal digit (A-F, a-f, 0-9)
public static IsHexDigit ( Char c ) : bool
c Char Character to test
Résultat bool

ToString() public static méthode

public static ToString ( byte bytes ) : string
bytes byte
Résultat string