Class HexEncoder
Provides methods for encoding byte arrays into hexadecimal strings.
Inheritance
object
Namespace: Umbraco.Cms.Core
Assembly: Umbraco.Core.dll
Syntax
public static class HexEncoder
Methods
View SourceEncode(byte[])
Converts a byte[] to a hexadecimal formatted string padded to 2 digits.
Declaration
public static string Encode(byte[] bytes)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | bytes | The bytes. |
Returns
| Type | Description |
|---|---|
| string | The string. |
Encode(byte[], char, int, int)
Converts a byte[] to a hexadecimal formatted string padded to 2 digits and split into blocks with the given char separator.
Declaration
public static string Encode(byte[] bytes, char separator, int blockSize, int blockCount)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | bytes | The bytes. |
| char | separator | The separator. |
| int | blockSize | The block size. |
| int | blockCount | The block count. |
Returns
| Type | Description |
|---|---|
| string |