HexEncoding
Namespace: Babel.Licensing Assembly: Babel.Licensing.dll
Converts between binary data and an hex-encoded string. This class cannot be inherited.
Inheritance
Implements
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
HexEncoding()
Methods
Decode(string)
Decodes the given hex string to its byte representation.
Parameters
Name | Description |
---|---|
| The encoded string. |
Returns
Name | Description |
---|---|
byte[] | The decoded string buffer. |
Examples
Exceptions
Name | Description |
---|---|
Thrown when one or more required arguments are null. |
Encode(byte[])
Encodes the given buffer to an hex string.
Parameters
Name | Description |
---|---|
| The buffer. |
Returns
Name | Description |
---|---|
The encoded hex string. |
Examples
Exceptions
Name | Description |
---|---|
Thrown when one or more required arguments are null. |
IsValidChar(char)
Query if the given character is a valid hex character.
Parameters
Name | Description |
---|---|
| The input character. |
Returns
Name | Description |
---|---|
true if valid character, false if not. |
TryDecode(string, out byte[])
Attempts to decode from the given data.
Parameters
Returns
Name | Description |
---|---|
true if it succeeds, false if it fails. |
Last updated