Class SodotUtils
- Namespace
- SodotSDK
- Assembly
- Unity.Temp.dll
Utility class providing cryptographic hashing and data conversion functions for the Sodot SDK.
public static class SodotUtils
- Inheritance
-
SodotUtils
- Inherited Members
Methods
HexDecode(string)
Decodes a hexadecimal string to a byte array.
public static byte[] HexDecode(string hex)
Parameters
hexstringThe hexadecimal string to decode (without "0x" prefix).
Returns
- byte[]
A byte array representing the decoded hexadecimal data.
Exceptions
- ArgumentNullException
Thrown when the hex string is null or empty.
- FormatException
Thrown when the hex string contains invalid characters.
HexEncode(byte[])
Encodes a byte array to a lowercase hexadecimal string.
public static string HexEncode(byte[] array)
Parameters
arraybyte[]The byte array to encode.
Returns
- string
A lowercase hexadecimal string representation of the byte array, or an empty string if the array is null or empty.