ms-types 0.10.8 → 0.10.10
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 +1 -1
- package/types/hid.d.ts +1 -1
- package/types/lua/action.lua +119 -89
- package/types/lua/ai.lua +34 -16
- package/types/lua/appleocr.lua +35 -22
- package/types/lua/cloud.lua +25 -12
- package/types/lua/config.lua +18 -11
- package/types/lua/cryptoUtils.lua +35 -27
- package/types/lua/cv.lua +173 -25
- package/types/lua/device.lua +38 -20
- package/types/lua/dotocr.lua +8 -2
- package/types/lua/file.lua +61 -40
- package/types/lua/global.lua +56 -20
- package/types/lua/hid.lua +148 -102
- package/types/lua/hotupdate.lua +25 -3
- package/types/lua/http.lua +71 -41
- package/types/lua/image.lua +222 -98
- package/types/lua/ime.lua +37 -13
- package/types/lua/logger.lua +22 -12
- package/types/lua/media.lua +54 -14
- package/types/lua/mysql.lua +61 -12
- package/types/lua/netcard.lua +25 -11
- package/types/lua/node.lua +4 -2
- package/types/lua/paddleocr.lua +35 -21
- package/types/lua/pip.lua +30 -18
- package/types/lua/system.lua +112 -31
- package/types/lua/tomatoocr.lua +73 -26
- package/types/lua/tts.lua +26 -10
- package/types/lua/ui.lua +35 -14
- package/types/lua/utils.lua +27 -17
- package/types/lua/yolo.lua +25 -17
- package/types/lua/yolocls.lua +27 -18
- package/types/zh/HID/346/250/241/345/235/227.d.ts +1 -1
|
@@ -1,46 +1,54 @@
|
|
|
1
1
|
---@meta
|
|
2
|
+
--- 加密工具模块
|
|
2
3
|
---@class CryptoUtils
|
|
3
4
|
local _CryptoUtils = {}
|
|
4
5
|
|
|
5
|
-
---
|
|
6
|
-
---@param data string
|
|
7
|
-
---@param aesKey string
|
|
8
|
-
---@param noPadding boolean
|
|
9
|
-
---@return string
|
|
6
|
+
--- 使用AES ECB模式加密数据 默认使用PKCS7填充
|
|
7
|
+
---@param data string 要加密的数据
|
|
8
|
+
---@param aesKey string AES密钥 支持16位、24位、32位字符串
|
|
9
|
+
---@param noPadding boolean 是否禁用填充,默认为false, 默认使用PKCS7填充
|
|
10
|
+
---@return string 加密后的数据
|
|
11
|
+
---@example cryptoUtils.encryptWithAES_ECB(data, aesKey, noPadding)
|
|
10
12
|
function _CryptoUtils.encryptWithAES_ECB(data, aesKey, noPadding) return "" end
|
|
11
13
|
|
|
12
|
-
---
|
|
13
|
-
---@param data string
|
|
14
|
-
---@param aesKey string
|
|
15
|
-
---@param noPadding boolean
|
|
16
|
-
---@return string
|
|
14
|
+
--- 使用AES ECB模式解密数据 默认使用PKCS7填充
|
|
15
|
+
---@param data string 要解密的数据
|
|
16
|
+
---@param aesKey string AES密钥 支持16位、24位、32位字符串
|
|
17
|
+
---@param noPadding boolean 是否禁用填充,默认为false, 默认使用PKCS7填充
|
|
18
|
+
---@return string 解密后的数据
|
|
19
|
+
---@example cryptoUtils.decryptWithAES_ECB(data, aesKey, noPadding)
|
|
17
20
|
function _CryptoUtils.decryptWithAES_ECB(data, aesKey, noPadding) return "" end
|
|
18
21
|
|
|
19
|
-
---
|
|
20
|
-
---@param data string
|
|
21
|
-
---@param publicKeyBase64 string
|
|
22
|
-
---@return string
|
|
22
|
+
--- 使用RSA公钥加密数据 默认使用PKCS1填充
|
|
23
|
+
---@param data string 要加密的数据
|
|
24
|
+
---@param publicKeyBase64 string RSA公钥
|
|
25
|
+
---@return string 加密后的数据
|
|
26
|
+
---@example cryptoUtils.encryptWithRSA(data, publicKeyBase64)
|
|
23
27
|
function _CryptoUtils.encryptWithRSA(data, publicKeyBase64) return "" end
|
|
24
28
|
|
|
25
|
-
---
|
|
26
|
-
---@param encryptedData string
|
|
27
|
-
---@param privateKeyBase64 string
|
|
28
|
-
---@return string
|
|
29
|
+
--- 使用RSA私钥解密数据 默认使用PKCS1填充
|
|
30
|
+
---@param encryptedData string 要解密的数据
|
|
31
|
+
---@param privateKeyBase64 string RSA私钥
|
|
32
|
+
---@return string 解密后的数据
|
|
33
|
+
---@example cryptoUtils.decryptWithRSA(encryptedData, privateKeyBase64)
|
|
29
34
|
function _CryptoUtils.decryptWithRSA(encryptedData, privateKeyBase64) return "" end
|
|
30
35
|
|
|
31
|
-
---
|
|
32
|
-
---@param data string
|
|
33
|
-
---@return string
|
|
36
|
+
--- 计算MD5值
|
|
37
|
+
---@param data string 要计算MD5的值
|
|
38
|
+
---@return string MD5值
|
|
39
|
+
---@example cryptoUtils.md5(data)
|
|
34
40
|
function _CryptoUtils.md5(data) return "" end
|
|
35
41
|
|
|
36
|
-
---
|
|
37
|
-
---@param data string
|
|
38
|
-
---@return string
|
|
42
|
+
--- 计算SHA1值
|
|
43
|
+
---@param data string 要计算SHA1的值
|
|
44
|
+
---@return string SHA1值
|
|
45
|
+
---@example cryptoUtils.sha1(data)
|
|
39
46
|
function _CryptoUtils.sha1(data) return "" end
|
|
40
47
|
|
|
41
|
-
---
|
|
42
|
-
---@param data string
|
|
43
|
-
---@return string
|
|
48
|
+
--- 计算SHA256值
|
|
49
|
+
---@param data string 要计算SHA256的值
|
|
50
|
+
---@return string SHA256值
|
|
51
|
+
---@example cryptoUtils.sha256(data)
|
|
44
52
|
function _CryptoUtils.sha256(data) return "" end
|
|
45
53
|
|
|
46
54
|
---@type CryptoUtils
|