Namespace: base64

convert. base64

Static class for Base64 Encoder / Decoder functionality. This is a child of convert.
Source:

Methods

<static> decode(str) → {string}

Decodes data from Base64 format string into plaintext
Parameters:
Name Type Description
str string Base64 string to decode
Source:
Returns:
ASCII-encoded plaintext string
Type
string
Example
	convert.base64.decode("VGhleSBkb24ndCBjYWxsIG1lIGhvbmVzdCBub3RoaW5nIGZvciBhYmUh");
	// outputs "They don't call me honest nothing for abe!"

<static> encode(data) → {string}

Encodes string data into Base64 format string
Parameters:
Name Type Description
data string ASCII-encoded string data
Source:
Returns:
Base64-encoded string
Type
string
Example
	convert.base64.encode("They don't call me honest nothing for abe!");
	// outputs "VGhleSBkb24ndCBjYWxsIG1lIGhvbmVzdCBub3RoaW5nIGZvciBhYmUh"