Namespace: codec
Methods
-
decodeBase64(base64Data) → {ArrayBuffer}
-
Decodes Base64 data
Parameters:
Name Type Description base64Data
String Base64 string to be decoded to its original content format Throws:
Throws an error if the input is invalidReturns:
- Type
- ArrayBuffer
-
decodeHex(hexData) → {ArrayBuffer}
-
Decodes hexadecimal data
Parameters:
Name Type Description hexData
String Hex string to be decoded to its original content format Throws:
Throws an error if the input is invalidReturns:
- Type
- ArrayBuffer
-
encodeBase64(data) → {String}
-
Encodes data into Base64
Parameters:
Name Type Description data
String | ArrayBuffer The data to encode. If the parameter is of type String, its UTF-8 representation will be considered Throws:
Throws an error if the input is invalidReturns:
- Type
- String
-
encodeHex(data) → {String}
-
Encodes data into hexadecimal format
Parameters:
Name Type Description data
String | ArrayBuffer The data to encode. If the parameter is of type String, its UTF-8 representation will be considered Throws:
Throws an error if the input is invalidReturns:
- Type
- String