sm-crypto-v2 1.9.1 → 1.9.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.9.2](https://github.com/Cubelrti/sm-crypto-v2/compare/v1.9.1...v1.9.2) (2024-08-16)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **sm4:** string type return ([406fa5a](https://github.com/Cubelrti/sm-crypto-v2/commit/406fa5a848015e3a02339f109f60ec1e8ec3fe8b))
11
+
5
12
  ### [1.9.1](https://github.com/Cubelrti/sm-crypto-v2/compare/v1.9.0...v1.9.1) (2024-07-09)
6
13
 
7
14
 
package/README.md CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  参数支持 TypedArray,导出 esm/cjs。
10
10
 
11
+ For WebAssembly-supported platform, see [sm-crypto-wasm](https://github.com/Cubelrti/sm-crypto-wasm) and its [Online Playground](https://cubelrti.github.io/sm-crypto-wasm/)
12
+
11
13
  ## 特性
12
14
 
13
15
  - ⚡ 基于 [`noble-curves` Abstract API](https://github.com/paulmillr/noble-curves#abstract-api) 重构 SM2,性能提升近4倍。详见 [noble-curves 文档](https://paulmillr.com/posts/noble-secp256k1-fast-ecc/)
package/dist/index.d.mts CHANGED
@@ -153,16 +153,16 @@ interface SM4Options {
153
153
  declare function sm4(inArray: Uint8Array | string, key: Uint8Array | string, cryptFlag: 0 | 1, options?: SM4Options): string | Uint8Array;
154
154
  declare function encrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
155
155
  output: 'array';
156
- } | SM4Options): Uint8Array;
156
+ } & SM4Options): Uint8Array;
157
157
  declare function encrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
158
158
  output: 'string';
159
- } | SM4Options): string;
159
+ } & SM4Options): string;
160
160
  declare function decrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
161
161
  output: 'array';
162
- } | SM4Options): Uint8Array;
162
+ } & SM4Options): Uint8Array;
163
163
  declare function decrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
164
164
  output: 'string';
165
- } | SM4Options): string;
165
+ } & SM4Options): string;
166
166
 
167
167
  type index_SM4Options = SM4Options;
168
168
  declare const index_decrypt: typeof decrypt;
package/dist/index.d.ts CHANGED
@@ -153,16 +153,16 @@ interface SM4Options {
153
153
  declare function sm4(inArray: Uint8Array | string, key: Uint8Array | string, cryptFlag: 0 | 1, options?: SM4Options): string | Uint8Array;
154
154
  declare function encrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
155
155
  output: 'array';
156
- } | SM4Options): Uint8Array;
156
+ } & SM4Options): Uint8Array;
157
157
  declare function encrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
158
158
  output: 'string';
159
- } | SM4Options): string;
159
+ } & SM4Options): string;
160
160
  declare function decrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
161
161
  output: 'array';
162
- } | SM4Options): Uint8Array;
162
+ } & SM4Options): Uint8Array;
163
163
  declare function decrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
164
164
  output: 'string';
165
- } | SM4Options): string;
165
+ } & SM4Options): string;
166
166
 
167
167
  type index_SM4Options = SM4Options;
168
168
  declare const index_decrypt: typeof decrypt;
@@ -153,16 +153,16 @@ interface SM4Options {
153
153
  declare function sm4(inArray: Uint8Array | string, key: Uint8Array | string, cryptFlag: 0 | 1, options?: SM4Options): string | Uint8Array;
154
154
  declare function encrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
155
155
  output: 'array';
156
- } | SM4Options): Uint8Array;
156
+ } & SM4Options): Uint8Array;
157
157
  declare function encrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
158
158
  output: 'string';
159
- } | SM4Options): string;
159
+ } & SM4Options): string;
160
160
  declare function decrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
161
161
  output: 'array';
162
- } | SM4Options): Uint8Array;
162
+ } & SM4Options): Uint8Array;
163
163
  declare function decrypt(inArray: Uint8Array | string, key: Uint8Array | string, options?: {
164
164
  output: 'string';
165
- } | SM4Options): string;
165
+ } & SM4Options): string;
166
166
 
167
167
  type index_SM4Options = SM4Options;
168
168
  declare const index_decrypt: typeof decrypt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sm-crypto-v2",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "sm-crypto-v2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",