Table of Contents

Class BlobConverter

Namespace
SunamoConverters.ConvertersSimple
Assembly
SunamoConverters.dll

Converts between byte arrays and hexadecimal string representation.

public class BlobConverter
Inheritance
BlobConverter
Inherited Members
Extension Methods

Fields

XTheProvidedStringDoesNotAppearToBeHexEncoded

Error message constant for when a string cannot be decoded as hex.

public static string XTheProvidedStringDoesNotAppearToBeHexEncoded

Field Value

string

Methods

ConvertFrom(string)

Converts a hexadecimal string representation to a byte array.

public byte[]? ConvertFrom(string value)

Parameters

value string

The hexadecimal string to convert.

Returns

byte[]

The byte array representation, or null if input is null or empty.

Exceptions

Exception

Thrown when the string is not properly hex-encoded.

ConvertTo(byte[])

Converts a byte array to a hexadecimal string representation.

public string ConvertTo(byte[] value)

Parameters

value byte[]

The byte array to convert.

Returns

string

A hexadecimal string representation of the byte array.