Smart.Framework Logo

static class smartJ$Base64
{ } .

CLASS :: Smart Base64 (ES6, Strict Mode)
Base64 for JavaScript: Encode / Decode


class Methods

public static function encode ( {String} s, {Boolean} bin ) {} . {String}
@hint: Javascript btoa () does not support UTF-8 but only ASCII
@throws: console.error
@return: {String} the Base64 encoded string
@param: {String} s The plain string (to be encoded)
@param: {Boolean} bin Set to TRUE if the string is binary to avoid re-encode to UTF-8
Encode a string to Base64
Supports also UTF-8
public static function decode ( {String} s, {Boolean} bin ) {} . {String}
@hint: Javascript atob () does not support UTF-8 but only ASCII
@throws: console.error
@return: {String} the plain (B64 decoded) string
@param: {String} s The B64 encoded string
@param: {Boolean} bin Set to TRUE if the string is binary to avoid re-decode as UTF-8
Decode a string from Base64
Supports also UTF-8

class Properties


class Constants



documentation generated on: 2023-10-19 23:19:05 +0000


Smart.Framework © 2009-2023 unix-world.org