szld-libs 0.2.49 → 0.2.51
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/dist/szld-components.es.js +16091 -17681
- package/dist/szld-components.umd.js +56 -56
- package/es/components/CreateForm/index.d.ts +1 -0
- package/es/components/CreateForm/index.js +4 -3
- package/es/index.js +45 -3
- package/es/main.d.ts +1 -1
- package/es/main.js +1 -1
- package/es/utils/hmacSM3.d.ts +20 -0
- package/es/utils/hmacSM3.js +173 -0
- package/lib/components/CreateForm/index.d.ts +1 -0
- package/lib/components/CreateForm/index.js +4 -3
- package/lib/index.js +44 -2
- package/lib/main.d.ts +1 -1
- package/lib/main.js +2 -2
- package/lib/utils/hmacSM3.d.ts +20 -0
- package/lib/utils/hmacSM3.js +172 -0
- package/package.json +2 -3
- package/es/utils/hmacsm3.d.ts +0 -7
- package/es/utils/hmacsm3.js +0 -20
- package/lib/utils/hmacsm3.d.ts +0 -7
- package/lib/utils/hmacsm3.js +0 -19
package/es/utils/hmacsm3.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { sm3 } from "sm-crypto";
|
|
8
|
-
class HmacSM3 {
|
|
9
|
-
constructor(secretKey) {
|
|
10
|
-
__publicField(this, "secretKey");
|
|
11
|
-
this.secretKey = secretKey;
|
|
12
|
-
}
|
|
13
|
-
encrypt(message) {
|
|
14
|
-
const params = this.secretKey ? { key: this.secretKey } : void 0;
|
|
15
|
-
return sm3(message, params);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
HmacSM3 as default
|
|
20
|
-
};
|
package/lib/utils/hmacsm3.d.ts
DELETED
package/lib/utils/hmacsm3.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __publicField = (obj, key, value) => {
|
|
5
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
-
return value;
|
|
7
|
-
};
|
|
8
|
-
const smCrypto = require("sm-crypto");
|
|
9
|
-
class HmacSM3 {
|
|
10
|
-
constructor(secretKey) {
|
|
11
|
-
__publicField(this, "secretKey");
|
|
12
|
-
this.secretKey = secretKey;
|
|
13
|
-
}
|
|
14
|
-
encrypt(message) {
|
|
15
|
-
const params = this.secretKey ? { key: this.secretKey } : void 0;
|
|
16
|
-
return smCrypto.sm3(message, params);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
module.exports = HmacSM3;
|