@fastcar/core 0.2.52 → 0.2.53
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/src/db.ts +2 -0
- package/src/utils/CryptoUtil.ts +2 -2
- package/target/db.js +2 -0
- package/target/utils/CryptoUtil.js +2 -2
package/package.json
CHANGED
package/src/db.ts
CHANGED
package/src/utils/CryptoUtil.ts
CHANGED
|
@@ -60,11 +60,11 @@ export default class CryptoUtil {
|
|
|
60
60
|
let pwd = Buffer.from(password, "hex");
|
|
61
61
|
|
|
62
62
|
//读取数组
|
|
63
|
-
let iv = tmpSerect.
|
|
63
|
+
let iv = tmpSerect.subarray(0, 12);
|
|
64
64
|
let cipher = crypto.createDecipheriv("aes-128-gcm", pwd, iv);
|
|
65
65
|
|
|
66
66
|
//这边的数据为 去除头的iv12位和尾部的tags的16位
|
|
67
|
-
let msg = cipher.update(tmpSerect.
|
|
67
|
+
let msg = cipher.update(tmpSerect.subarray(12, tmpSerect.length - 16));
|
|
68
68
|
|
|
69
69
|
return msg.toString("utf8");
|
|
70
70
|
} catch (e) {
|
package/target/db.js
CHANGED
|
@@ -21,6 +21,8 @@ var OperatorEnum;
|
|
|
21
21
|
OperatorEnum["dec"] = "-";
|
|
22
22
|
OperatorEnum["multiply"] = "*";
|
|
23
23
|
OperatorEnum["division"] = "/";
|
|
24
|
+
OperatorEnum["notin"] = "NOT IN";
|
|
25
|
+
OperatorEnum["custom"] = "CUSTOM";
|
|
24
26
|
})(OperatorEnum = exports.OperatorEnum || (exports.OperatorEnum = {}));
|
|
25
27
|
var JoinEnum;
|
|
26
28
|
(function (JoinEnum) {
|
|
@@ -45,10 +45,10 @@ class CryptoUtil {
|
|
|
45
45
|
let tmpSerect = Buffer.from(serect, "base64");
|
|
46
46
|
let pwd = Buffer.from(password, "hex");
|
|
47
47
|
//读取数组
|
|
48
|
-
let iv = tmpSerect.
|
|
48
|
+
let iv = tmpSerect.subarray(0, 12);
|
|
49
49
|
let cipher = crypto.createDecipheriv("aes-128-gcm", pwd, iv);
|
|
50
50
|
//这边的数据为 去除头的iv12位和尾部的tags的16位
|
|
51
|
-
let msg = cipher.update(tmpSerect.
|
|
51
|
+
let msg = cipher.update(tmpSerect.subarray(12, tmpSerect.length - 16));
|
|
52
52
|
return msg.toString("utf8");
|
|
53
53
|
}
|
|
54
54
|
catch (e) {
|