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
Methods
ConvertFrom(string)
Converts a hexadecimal string representation to a byte array.
public byte[]? ConvertFrom(string value)
Parameters
valuestringThe 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
valuebyte[]The byte array to convert.
Returns
- string
A hexadecimal string representation of the byte array.