Show / Hide Table of Contents

Class Utils

Inheritance
object
Utils
Namespace: Xrpl.AddressCodec
Assembly: Xrpl.AddressCodec.dll
Syntax
public static class Utils

Methods

| Edit this page View Source

Combine(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[]
| Edit this page View Source

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

hex is null.

FormatException

hex has a character that is not a hex digit or skipped whitespace, or an odd number of digits.

| Edit this page View Source

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

bytes is null.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX