utils/base64
Documentation
- source: utils/base64.ts
Overview
Classes
Base64
encode()
Base64 encoding: Converts the input data (text or byte array) into a standard Base64 encoded 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 Base64 encoded string.
encodeAsBytes()
Base64 encoding: Converts the input data (text or byte array) into a JavaScript byte array (any[]) containing the Base64 encoded 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 Base64 encoded data.
encodeAsNativeBytes()
Base64 encoding: Converts the input data (text or byte array) into a native Java byte array containing the Base64 encoded 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 containing the Base64 data.
decode()
Base64 decoding: Converts a Base64 input (text or byte array) back into the original raw byte array (JavaScript any[]).
tsstatic decode(input: any): void;
Parameter Type Description inputanyThe Base64 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()
Base64 decoding: Converts a Base64 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): void;
Parameter Type Description inputanyThe Base64 data to decode, either as a string or a JavaScript byte array (any[]). Returns
- Type:
void- Description: The decoded native Java byte array.
