ms-types 0.3.25 → 0.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/types/cryptoUtils.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
declare namespace cryptoUtils {
|
|
2
|
-
/// 使用AES
|
|
2
|
+
/// 使用AES ECB模式加密数据 默认使用PKCS7填充
|
|
3
3
|
/// - Parameters:
|
|
4
4
|
/// - aesKey: AES密钥
|
|
5
5
|
/// - data: 要加密的数据
|
|
6
|
-
/// - noPadding: 是否禁用填充,默认为false
|
|
6
|
+
/// - noPadding: 是否禁用填充,默认为false, 默认使用PKCS7填充
|
|
7
7
|
/// - Returns: 加密后的数据
|
|
8
|
-
function
|
|
8
|
+
function encryptWithAES_ECB(
|
|
9
9
|
aesKey: string,
|
|
10
10
|
data: string,
|
|
11
11
|
noPadding?: boolean
|
|
12
12
|
): string;
|
|
13
13
|
|
|
14
|
-
/// 使用AES
|
|
14
|
+
/// 使用AES ECB模式解密数据 默认使用PKCS7填充
|
|
15
15
|
/// - Parameters:
|
|
16
|
-
/// - aesKey: AES密钥
|
|
16
|
+
/// - aesKey: AES密钥 32位16进制字符串
|
|
17
17
|
/// - data: 要解密的数据
|
|
18
|
-
/// - noPadding: 是否禁用填充,默认为false
|
|
18
|
+
/// - noPadding: 是否禁用填充,默认为false, 默认使用PKCS7填充
|
|
19
19
|
/// - Returns: 解密后的数据
|
|
20
|
-
function
|
|
20
|
+
function decryptWithAES_ECB(
|
|
21
21
|
aesKey: string,
|
|
22
22
|
data: string,
|
|
23
23
|
noPadding?: boolean
|
package/types/utils.d.ts
CHANGED
|
@@ -33,6 +33,15 @@ declare namespace utils {
|
|
|
33
33
|
*/
|
|
34
34
|
function takeMeToFront(): boolean;
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* str转 hex 字符串
|
|
38
|
+
* @param source 字符串
|
|
39
|
+
* @returns hex字符串
|
|
40
|
+
* @example
|
|
41
|
+
* utils.hexString("hello")
|
|
42
|
+
*/
|
|
43
|
+
function hexString(source: string): string;
|
|
44
|
+
|
|
36
45
|
/**
|
|
37
46
|
* 字符串转base64
|
|
38
47
|
* @param source 字符串
|
|
@@ -34,6 +34,14 @@ declare namespace $工具 {
|
|
|
34
34
|
* $工具.APP切入前台()
|
|
35
35
|
*/
|
|
36
36
|
function APP切入前台(): 布尔值;
|
|
37
|
+
/**
|
|
38
|
+
* 字符串转hex
|
|
39
|
+
* @param source 字符串
|
|
40
|
+
* @returns hex字符串
|
|
41
|
+
* @example
|
|
42
|
+
* utils.字符串转hex("hello")
|
|
43
|
+
*/
|
|
44
|
+
function 字符串转hex(source: string): string;
|
|
37
45
|
/**
|
|
38
46
|
* 字符串转base64
|
|
39
47
|
* @param source 字符串
|