utils/hex
Documentation
- source: utils/hex.ts
Overview
Classes
Hex
encode()
Hexadecimal encoding: Converts the input data (text or byte array) into a standard hexadecimal string representation.
tsstatic encode(input: any): string;
Parameter Type Description inputanyThe data to encode, either as a string or a JavaScript byte array (any[]). Returns
- Type:
string- Description: The resulting hexadecimal string.
encodeAsBytes()
Hexadecimal encoding: Converts the input data (text or byte array) into a JavaScript byte array (any[]) containing the hexadecimal representation.
tsstatic encodeAsBytes(input: any): void;
Parameter Type Description inputanyThe data to encode, either as a string or a JavaScript byte array (any[]). Returns
- Type:
void- Description: The resulting byte array containing the hexadecimal data.
encodeAsNativeBytes()
Hexadecimal encoding: Converts the input data (text or byte array) into a native Java byte array containing the hexadecimal representation. This method is generally for internal use.
tsstatic encodeAsNativeBytes(input: any): void;
Parameter Type Description inputanyThe data to encode, either as a string or a JavaScript byte array (any[]). Returns
- Type:
void- Description: The resulting native Java byte array.
decode()
Hexadecimal decoding: Converts a hexadecimal input (text or byte array) back into the original raw byte array (JavaScript any[]).
tsstatic decode(input: any): void;
Parameter Type Description inputanyThe hexadecimal data to decode, either as a string or a JavaScript byte array (any[]). Returns
- Type:
void- Description: The decoded raw byte array (any[]). Returns null if decoding fails or input is null.
decodeAsNativeBytes()
Hexadecimal decoding: Converts a hexadecimal input (text or byte array) back into the original native Java raw byte array. This method is generally for internal use.
tsstatic decodeAsNativeBytes(input: any): any;
Parameter Type Description inputanyThe hexadecimal data to decode, either as a string or a JavaScript byte array (any[]). Returns
- Type:
any- Description: The decoded native Java byte array.
