需安装crypto-js依赖,小程序引用crypto-js比较大,如果只是base64的转换,引用base64.js即可
- Description:
需安装crypto-js依赖,小程序引用crypto-js比较大,如果只是base64的转换,引用base64.js即可
- Source:
Methods
(inner) aesInit(argKey)
- Description:
aes初始化,选定aes加密码方式后,先执行初始化
- Source:
Parameters:
Name | Type | Description |
---|---|---|
argKey |
string | 密钥 |
(inner) deAes(word) → {string}
- Description:
aes解密
- Source:
Parameters:
Name | Type | Description |
---|---|---|
word |
string | 待解密内容 |
Returns:
已解密内容
- Type
- string
(inner) deBase64(argData) → {string}
- Description:
base64 解密
- Source:
Parameters:
Name | Type | Description |
---|---|---|
argData |
string | 待解密内容 |
Returns:
已解密内容
- Type
- string
(inner) decode(argData, argType) → {string}
- Description:
解密
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
argData |
string | 待解密内容 |
|
argType |
string |
base64
|
解密类型,默认base64 |
Returns:
已解密内容
- Type
- string
(inner) enAes(word) → {string}
- Description:
aes加密
- Source:
Parameters:
Name | Type | Description |
---|---|---|
word |
string | number | 待加密内容 |
Returns:
已加密内容
- Type
- string
(inner) enBase64(argData) → {string}
- Description:
base64 加密
- Source:
Parameters:
Name | Type | Description |
---|---|---|
argData |
string | number | 待加密内容 |
Returns:
已加密内容
- Type
- string
(inner) encode(argData, argType) → {string}
- Description:
加密
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
argData |
string | number | 待加密内容 |
|
argType |
string |
base64
|
加密类型,默认base64 |
Returns:
已加密内容
- Type
- string
(inner) md5(argData) → {string}
- Description:
md5 加密
- Source:
Parameters:
Name | Type | Description |
---|---|---|
argData |
string | CryptoJS.lib.WordArray | 待加密内容 |
Returns:
已加密内容
- Type
- string