Base64 - Base64
# Base64
提供基本的Base64转换函数。
## $base64.encode(str, encoding = 'utf-8')
** [[Pro 7.0.4新增](https://pro.autojs.org/)] **
* `str` {string} 要编码的字符串
* `encoding` {string} 可选,字符编码
将字符串str使用Base64编码并返回编码后的字符串。
```javascript
console.log($base64.encode('test')); // 打印dGVzdA==
```
## $base64.decode(str, encoding = 'utf-8')
** [[Pro 7.0.4新增](https://pro.autojs.org/)] **
* `str` {string} 要解码的字符串
* `encoding` {string} 可选,字符编码
将字符串str使用Base64解码并返回解码后的字符串。
```javascript
console.log($base64.decode('dGVzdA==')); // 打印test
```