Skip to content

qie.base64Encode

Signature: qie.base64Encode(input, charset*)

Returns: String encodedValue - the Base64 encoded value

Base64 encode the input value.

Parameters

Type Name Description Default
String input the ASCII value to be Base64 encoded
String charset* (optional) the character set to use when base 64 encoding the String UTF-8

Example

var originalString = '"Life is beautiful, and 爱 makes it even better!"';
var encoded = qie.base64Encode(originalString);
var decoded = qie.base64Decode(encoded); // decoded will match originalString