CLASS :: Smart Base64 (ES6, Strict Mode)
Base64 for JavaScript: Encode / Decode
Language: Javascript
Located at: lib/js/framework/smart-framework.pak.js; crypt_utils.js
Package: Sf.Javascript:Crypto
Class Name: smartJ$Base64
Frozen: Yes
Version: 20220730
Usage: smartJ$Base64.method();
Throws: console.error
Depends: smartJ$Utils, smartJ$TestCrypto
class Methods
public staticfunctionencode (
{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 staticfunctiondecode (
{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
Base64 for JavaScript: Encode / Decode