Class HexEncoder
Provides methods for encoding byte arrays into hexadecimal strings.
Inheritance
System.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 System.String padded to 2 digits.
Declaration
public static string Encode(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | The bytes. |
Returns
Type | Description |
---|---|
System.String | The System.String. |
Encode(Byte[], Char, Int32, Int32)
Converts a byte[] to a hexadecimal formatted System.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 |
---|---|---|
System.Byte[] | bytes | The bytes. |
System.Char | separator | The separator. |
System.Int32 | blockSize | The block size. |
System.Int32 | blockCount | The block count. |
Returns
Type | Description |
---|---|
System.String |