1.6 KiB
1.6 KiB
Builtin - 信息摘要及编码
函数
strToBase64(s)
将字符串转换为对应类型。
| 参数 | 类型 | 说明 |
|---|---|---|
s |
string | 原始字符串 |
返回:string
base64ToStr(s)
将输入值转换为字符串。
| 参数 | 类型 | 说明 |
|---|---|---|
s |
string | Base64 编码字符串 |
返回:string
URI 编码函数
encodeUriComponent(s)
按 URI component 规则编码字符串。
| 参数 | 类型 | 说明 |
|---|---|---|
s |
string | 待编码字符串 |
返回:string
decodeUriComponent(s)
按 URI component 规则解码字符串。
| 参数 | 类型 | 说明 |
|---|---|---|
s |
string | 待解码字符串 |
返回:string
encodeUri(s)
按 URI 规则编码字符串。
| 参数 | 类型 | 说明 |
|---|---|---|
s |
string | 待编码字符串 |
返回:string
decodeUri(s)
按 URI 规则解码字符串。
| 参数 | 类型 | 说明 |
|---|---|---|
s |
string | 待解码字符串 |
返回:string
信息摘要函数
getMsgDigest(s, mode)
计算字符串s的摘要,返回摘要的字符串
| 参数 | 类型 | 说明 |
|---|---|---|
s |
string | 计算摘要的字符串。 |
mode |
any | 指定摘要算法,摘要函数支持的算法包括: |
返回:string