base64
October 22, 2022
base64
Provides basic Base64 conversion functions.
$base64.encode(str, encoding = 'utf-8')
** [New in Pro 7.0.4] **
str
{string} The string to encodeencoding
{string} Optional, character encoding
Encodes the string str using Base64 and returns the encoded string.
console.log($base64.encode('test')); // print 'dGVzdA=='
$base64.decode(str, encoding = 'utf-8')
** [New in Pro 7.0.4] **
str
{string} The string to decodeencoding
{string} Optional, character encoding
Decodes the string str using Base64 and returns the decoded string.
console.log($base64.decode('dGVzdA==')); // print 'test'