Class Utils
Inheritance
object
Utils
Namespace: Xrpl.AddressCodec
Assembly: Xrpl.AddressCodec.dll
Syntax
public static class Utils
Methods
| Edit this page View SourceCombine(params byte[][])
combine bytes arrays to single array
Declaration
public static byte[] Combine(params byte[][] arrays)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[][] | arrays | bytes arrays |
Returns
| Type | Description |
|---|---|
| byte[] |
FromHex(string)
Decodes a hex string, either case. Spaces, tabs, carriage returns and line feeds between digits are skipped, as the BouncyCastle decoder this replaces skipped them.
Declaration
public static byte[] FromHex(this string hex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | hex | The hex string. |
Returns
| Type | Description |
|---|---|
| byte[] | The decoded bytes; empty for an empty string. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| FormatException |
|
ToHex(byte[])
Encodes bytes as upper-case hex, two digits per byte.
Declaration
public static string ToHex(this byte[] bytes)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | bytes | The bytes to encode. |
Returns
| Type | Description |
|---|---|
| string | The hex string; empty for an empty array. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|