n20-common-lib 2.9.13 → 2.9.14

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.
Files changed (130) hide show
  1. package/nstc-g6/components/NstcCharts/NstcCharts.vue +16 -8
  2. package/package.json +8 -5
  3. package/src/assets/css/approve-card.scss +1 -1
  4. package/src/assets/css/date-quarter.scss +8 -0
  5. package/src/assets/css/expandable-pane.scss +7 -0
  6. package/src/assets/css/file-upload-table.scss +2 -3
  7. package/src/assets/css/font-icon.scss +3 -1
  8. package/src/assets/css/message.scss +6 -6
  9. package/src/assets/css/normalize.scss +4 -1
  10. package/src/assets/css/table.scss +16 -11
  11. package/src/assets/iconFont/SIMSUN.ttf +0 -0
  12. package/src/assets/iconFont/font.css +4 -0
  13. package/src/components/AIButton/index.vue +101 -0
  14. package/src/components/AdvancedFilter/formItemRender.vue +7 -4
  15. package/src/components/AdvancedFilter/index.vue +6 -7
  16. package/src/components/Anchor/index.vue +1 -0
  17. package/src/components/ApprovalButtons/index.vue +404 -82
  18. package/src/components/ApprovalButtons/indexApp.vue +1102 -0
  19. package/src/components/ApprovalButtons/selectSpr.vue +128 -0
  20. package/src/components/ApprovalButtons/setCarboncopyProp.vue +1 -1
  21. package/src/components/ApprovalButtons/setRejectToProp.vue +45 -5
  22. package/src/components/ApprovalButtons/showAppOpi.vue +265 -8
  23. package/src/components/ApprovalButtons/showOtherAttrNew.vue +161 -0
  24. package/src/components/ApprovalCard/index.vue +190 -44
  25. package/src/components/ApprovalCard/indexApp.vue +592 -0
  26. package/src/components/ApprovalRecord/approvalImgPro/child.vue +1 -1
  27. package/src/components/ApprovalRecord/approvalImgPro/index.vue +42 -5
  28. package/src/components/ApprovalRecord/index.vue +23 -6
  29. package/src/components/ApprovalRecord/indexApp.vue +79 -0
  30. package/src/components/AttachmentPass/index.vue +286 -0
  31. package/src/components/Button/button-group.vue +3 -1
  32. package/src/components/CascaderArea/index.vue +5 -6
  33. package/src/components/DatePicker/por.vue +31 -1
  34. package/src/components/DateSelect/quarterDatePicker.vue +23 -1
  35. package/src/components/Descriptions/index.vue +7 -3
  36. package/src/components/Dialog/index.vue +4 -0
  37. package/src/components/Diff/index.vue +4 -2
  38. package/src/components/DynamicField/DynamicField.vue +29 -6
  39. package/src/components/DynamicField/DynamicFieldMixin.js +13 -5
  40. package/src/components/DynamicField/DynamicFieldOptions.vue +135 -62
  41. package/src/components/DynamicField/DynamicTable.vue +11 -1
  42. package/src/components/DynamicField/contentPop.vue +110 -0
  43. package/src/components/DynamicField/tableList.vue +5 -1
  44. package/src/components/DynamicField/tableView.vue +143 -0
  45. package/src/components/ECharts/index.vue +15 -9
  46. package/src/components/Expandable/main.vue +17 -2
  47. package/src/components/FileImport/index.vue +4 -5
  48. package/src/components/FileUploadTable/FileUploadTableV3.vue +937 -0
  49. package/src/components/FileUploadTable/aiCheckDialog.vue +139 -0
  50. package/src/components/FileUploadTable/index.vue +251 -33
  51. package/src/components/FileUploadTable/jytg.svg +6 -0
  52. package/src/components/FileUploadTable/wsc.svg +3 -0
  53. package/src/components/FileUploadTable/ysc.svg +3 -0
  54. package/src/components/HandlingAdvice/index.vue +191 -0
  55. package/src/components/InputAccount/index.vue +105 -0
  56. package/src/components/InputNumber/index.vue +16 -4
  57. package/src/components/InputNumber/numberRange.vue +14 -0
  58. package/src/components/InputSearch/index.vue +8 -0
  59. package/src/components/Layout/HeaderWrap/changePwd.vue +50 -23
  60. package/src/components/Layout/HeaderWrap/index.vue +2 -2
  61. package/src/components/Layout/HeaderWrap/indexN.vue +296 -119
  62. package/src/components/Layout/SubContent/index.vue +45 -14
  63. package/src/components/Layout/indexN.vue +26 -5
  64. package/src/components/LoginTemporary/form.vue +126 -34
  65. package/src/components/LoginTemporary/index.vue +14 -3
  66. package/src/components/LoginTemporary/indexN.vue +35 -13
  67. package/src/components/Preview/index.vue +199 -0
  68. package/src/components/SelectDatePickerPro/customDatePicker.vue +7 -0
  69. package/src/components/SelectDatePickerPro/halfYearPicker.vue +165 -0
  70. package/src/components/SelectDatePickerPro/index.vue +44 -4
  71. package/src/components/SelectDatePickerPro/quarterDatePicker.vue +32 -10
  72. package/src/components/SelectTree/index.vue +10 -4
  73. package/src/components/SelectTree/pro.vue +3 -0
  74. package/src/components/ShowColumn/index copy 2.vue +545 -0
  75. package/src/components/ShowColumn/index copy.vue +566 -0
  76. package/src/components/ShowColumn/index.vue +11 -7
  77. package/src/components/Statis/statisItem.vue +8 -7
  78. package/src/components/Table/filters.js +13 -0
  79. package/src/components/Table/index.vue +4 -4
  80. package/src/components/TablePro/filterContent.vue +18 -8
  81. package/src/components/TablePro/index.js +41 -1
  82. package/src/components/TablePro/index.vue +117 -6
  83. package/src/components/TableProOperateColumn/OperateBtns.vue +11 -53
  84. package/src/components/TableProOperateColumn/OperateBtns_copy.vue +141 -0
  85. package/src/components/TableProOperateColumn/childrenOperateBtn.vue +108 -0
  86. package/src/components/TableProOperateColumn/index.vue +3 -6
  87. package/src/components/TableSetSize/index.vue +1 -1
  88. package/src/components/Tree/index.vue +21 -5
  89. package/src/components/Upload/index.vue +25 -10
  90. package/src/components/Upload/uploadMsg.vue +30 -25
  91. package/src/components/operatingStatus/index.vue +3 -4
  92. package/src/directives/VTitle/index.js +15 -5
  93. package/src/directives/watermark/index.js +140 -56
  94. package/src/i18n.json +146 -18
  95. package/src/index.js +31 -3
  96. package/src/plugins/Sign/CaMap.js +47 -8
  97. package/src/plugins/Sign/Itrus/index.js +1 -1
  98. package/src/plugins/Sign/Itrus/sign_3720.js +2 -1
  99. package/src/plugins/Sign/NetSM3/index.js +20 -11
  100. package/src/plugins/Sign/NetV3/index.js +163 -22
  101. package/src/plugins/Sign/SkfSign/index.js +55 -52
  102. package/src/plugins/Sign/bjca/index.js +229 -9
  103. package/src/plugins/Sign/hnca/index.js +5064 -0
  104. package/src/plugins/Sign/index.js +155 -103
  105. package/src/plugins/Sign/kySign/base64.js +160 -0
  106. package/src/plugins/Sign/kySign/hex.js +92 -0
  107. package/src/plugins/Sign/kySign/index.js +186 -0
  108. package/src/plugins/Sign/kySign/skf.js +937 -0
  109. package/src/plugins/Sign/kySign/test.html +463 -0
  110. package/src/plugins/Sign/sdca/index.js +73 -0
  111. package/src/plugins/Sign/sign.js +72 -52
  112. package/src/plugins/Sign/signV3/InfosecNetSignCNGAgent.min.js +1 -0
  113. package/src/plugins/Sign/signV3/sign.js +187 -0
  114. package/src/plugins/Sign/sign_back.js +172 -0
  115. package/src/utils/accountFormat.js +7 -0
  116. package/src/utils/asyncGetRelaNos.js +79 -46
  117. package/src/utils/axios.js +3 -5
  118. package/src/utils/i18n/index.js +1 -1
  119. package/src/utils/importGlobal.js +23 -12
  120. package/style/fonts/SIMSUN.5e0c362c.ttf +0 -0
  121. package/style/index.css +2 -2
  122. package/theme/blue.css +2 -2
  123. package/theme/cctcRed.css +2 -2
  124. package/theme/fonts/SIMSUN.5e0c362c.ttf +0 -0
  125. package/theme/green.css +2 -2
  126. package/theme/lightBlue.css +2 -2
  127. package/theme/orange.css +2 -2
  128. package/theme/purple.css +2 -2
  129. package/theme/red.css +2 -2
  130. package/theme/yellow.css +2 -2
@@ -0,0 +1,937 @@
1
+ /**
2
+ * 标准SKF接口对象
3
+ */
4
+ const postInvokeSrv = function (method, data) {
5
+ const _xhr = new XMLHttpRequest()
6
+ _xhr.open('POST', 'http://127.0.0.1:2020/ssm/ukey/' + method, false)
7
+ _xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8')
8
+ _xhr.send(data)
9
+ if (_xhr.status == 200) {
10
+ return JSON.parse(_xhr.responseText)
11
+ } else {
12
+ return {
13
+ status: _xhr.status,
14
+ msg: _xhr.statusText
15
+ }
16
+ }
17
+ }
18
+ var SKF = /** @class */ (function () {
19
+ function SKF(port, srvUrl) {
20
+ if (port == undefined || port == null || port + '' == '') {
21
+ this._port = 1819
22
+ } else {
23
+ this._port = port
24
+ }
25
+ if (srvUrl != null && srvUrl != undefined && srvUrl != '') {
26
+ this._srvUrl = srvUrl
27
+ } else {
28
+ this._srvUrl = 'https://127.0.0.1:' + this._port + '/ssm/ukey/'
29
+ }
30
+ }
31
+ /**
32
+ * 枚举设备
33
+ * @returns,设备名称列表
34
+ */
35
+ SKF.prototype.SKF_EnumDev = function (Present) {
36
+ return postInvokeSrv(
37
+ 'SKF_EnumDev',
38
+ JSON.stringify({
39
+ Present: Present
40
+ })
41
+ )
42
+ }
43
+
44
+ SKF.prototype.SKF_ConnectDev = function (DevName) {
45
+ return postInvokeSrv(
46
+ 'SKF_ConnectDev',
47
+ JSON.stringify({
48
+ DevName: DevName
49
+ })
50
+ )
51
+ }
52
+
53
+ SKF.prototype.SKF_DisConnectDev = function (DevHandle) {
54
+ return postInvokeSrv(
55
+ 'SKF_DisConnectDev',
56
+ JSON.stringify({
57
+ DevHandle: DevHandle
58
+ })
59
+ )
60
+ }
61
+
62
+ SKF.prototype.SKF_GetDevState = function (DevName) {
63
+ return postInvokeSrv(
64
+ 'SKF_GetDevState',
65
+ JSON.stringify({
66
+ DevName: DevName
67
+ })
68
+ )
69
+ }
70
+
71
+ SKF.prototype.SKF_SetLabel = function (DevHandle, Label) {
72
+ return postInvokeSrv(
73
+ 'SKF_SetLabel',
74
+ JSON.stringify({
75
+ DevHandle: DevHandle,
76
+ Label: Label
77
+ })
78
+ )
79
+ }
80
+
81
+ SKF.prototype.SKF_GetDevInfo = function (DevHandle) {
82
+ return postInvokeSrv(
83
+ 'SKF_GetDevInfo',
84
+ JSON.stringify({
85
+ DevHandle: DevHandle
86
+ })
87
+ )
88
+ }
89
+
90
+ SKF.prototype.SKF_LockDev = function (DevHandle, Timeout) {
91
+ return postInvokeSrv(
92
+ 'SKF_LockDev',
93
+ JSON.stringify({
94
+ DevHandle: DevHandle,
95
+ Timeout: Timeout
96
+ })
97
+ )
98
+ }
99
+
100
+ SKF.prototype.SKF_UnlockDev = function (DevHandle, Timeout) {
101
+ return postInvokeSrv(
102
+ 'SKF_UnlockDev',
103
+ JSON.stringify({
104
+ DevHandle: DevHandle
105
+ })
106
+ )
107
+ }
108
+
109
+ SKF.prototype.SKF_ChangeDevAuthKey = function (DevHandle, KeyValue, KeyLen) {
110
+ return postInvokeSrv(
111
+ 'SKF_ChangeDevAuthKey',
112
+ JSON.stringify({
113
+ DevHandle: DevHandle,
114
+ KeyValue: KeyValue,
115
+ KeyLen: KeyLen
116
+ })
117
+ )
118
+ }
119
+
120
+ SKF.prototype.SKF_DevAuth = function (DevHandle, AuthData, AuthDataLen) {
121
+ return postInvokeSrv(
122
+ 'SKF_DevAuth',
123
+ JSON.stringify({
124
+ DevHandle: DevHandle,
125
+ AuthData: AuthData,
126
+ AuthDataLen: AuthDataLen
127
+ })
128
+ )
129
+ }
130
+
131
+ SKF.prototype.SKF_ChangePIN = function (Application, PinType, OldPin, NewPin) {
132
+ return postInvokeSrv(
133
+ 'SKF_ChangePIN',
134
+ JSON.stringify({
135
+ Application: Application,
136
+ PinType: PinType,
137
+ OldPin: OldPin,
138
+ NewPin: NewPin
139
+ })
140
+ )
141
+ }
142
+
143
+ SKF.prototype.SKF_GetPINInfo = function (Application, PinType) {
144
+ return postInvokeSrv(
145
+ 'SKF_GetPINInfo',
146
+ JSON.stringify({
147
+ Application: Application,
148
+ PinType: PinType
149
+ })
150
+ )
151
+ }
152
+
153
+ SKF.prototype.SKF_VerifyPIN = function (Application, PinType, Pin) {
154
+ return postInvokeSrv(
155
+ 'SKF_VerifyPIN',
156
+ JSON.stringify({
157
+ Application: Application,
158
+ PinType: PinType,
159
+ Pin: Pin
160
+ })
161
+ )
162
+ }
163
+
164
+ SKF.prototype.SKF_UnblockPIN = function (Application, AdminPin, NewUserPin) {
165
+ return postInvokeSrv(
166
+ 'SKF_UnblockPIN',
167
+ JSON.stringify({
168
+ Application: Application,
169
+ AdminPin: AdminPin,
170
+ NewUserPin: NewUserPin
171
+ })
172
+ )
173
+ }
174
+
175
+ SKF.prototype.SKF_GenRemoteUnblockRequest = function (Application, RandomLen) {
176
+ return postInvokeSrv(
177
+ 'SKF_GenRemoteUnblockRequest',
178
+ JSON.stringify({
179
+ Application: Application,
180
+ RandomLen: RandomLen
181
+ })
182
+ )
183
+ }
184
+
185
+ SKF.prototype.SKF_RemoteUnblockPIN = function (Application, CipherPin, CipherPinLen) {
186
+ return postInvokeSrv(
187
+ 'SKF_RemoteUnblockPIN',
188
+ JSON.stringify({
189
+ Application: Application,
190
+ CipherPin: CipherPin,
191
+ CipherPinLen: CipherPinLen
192
+ })
193
+ )
194
+ }
195
+
196
+ SKF.prototype.SKF_ClearSecureState = function (Application) {
197
+ return postInvokeSrv(
198
+ 'SKF_ClearSecureState',
199
+ JSON.stringify({
200
+ Application: Application
201
+ })
202
+ )
203
+ }
204
+
205
+ SKF.prototype.SKF_CreateApplication = function (
206
+ DevHandle,
207
+ AppName,
208
+ AdminPin,
209
+ AdminPinRetryCount,
210
+ UserPin,
211
+ UserPinRetryCount,
212
+ CreateFileRights
213
+ ) {
214
+ return postInvokeSrv(
215
+ 'SKF_CreateApplication',
216
+ JSON.stringify({
217
+ DevHandle: DevHandle,
218
+ AppName: AppName,
219
+ AdminPin: AdminPin,
220
+ AdminPinRetryCount: AdminPinRetryCount,
221
+ UserPin: UserPin,
222
+ UserPinRetryCount: UserPinRetryCount,
223
+ CreateFileRights: CreateFileRights
224
+ })
225
+ )
226
+ }
227
+
228
+ SKF.prototype.SKF_EnumApplication = function (DevHandle) {
229
+ return postInvokeSrv(
230
+ 'SKF_EnumApplication',
231
+ JSON.stringify({
232
+ DevHandle: DevHandle
233
+ })
234
+ )
235
+ }
236
+
237
+ SKF.prototype.SKF_DeleteApplication = function (DevHandle, AppName) {
238
+ return postInvokeSrv(
239
+ 'SKF_DeleteApplication',
240
+ JSON.stringify({
241
+ DevHandle: DevHandle,
242
+ AppName: AppName
243
+ })
244
+ )
245
+ }
246
+
247
+ SKF.prototype.SKF_OpenApplication = function (DevHandle, AppName) {
248
+ return postInvokeSrv(
249
+ 'SKF_OpenApplication',
250
+ JSON.stringify({
251
+ DevHandle: DevHandle,
252
+ AppName: AppName
253
+ })
254
+ )
255
+ }
256
+
257
+ SKF.prototype.SKF_CloseApplication = function (Application) {
258
+ return postInvokeSrv(
259
+ 'SKF_CloseApplication',
260
+ JSON.stringify({
261
+ Application: Application
262
+ })
263
+ )
264
+ }
265
+
266
+ SKF.prototype.SKF_CreateFile = function (Application, FileName, FileSize, ReadRights, WriteRights) {
267
+ return postInvokeSrv(
268
+ 'SKF_CreateFile',
269
+ JSON.stringify({
270
+ Application: Application,
271
+ FileName: FileName,
272
+ FileSize: FileSize,
273
+ ReadRights: ReadRights,
274
+ WriteRights: WriteRights
275
+ })
276
+ )
277
+ }
278
+
279
+ SKF.prototype.SKF_DeleteFile = function (Application, FileName) {
280
+ return postInvokeSrv(
281
+ 'SKF_DeleteFile',
282
+ JSON.stringify({
283
+ Application: Application,
284
+ FileName: FileName
285
+ })
286
+ )
287
+ }
288
+
289
+ SKF.prototype.SKF_EnumFiles = function (Application) {
290
+ return postInvokeSrv(
291
+ 'SKF_EnumFiles',
292
+ JSON.stringify({
293
+ Application: Application
294
+ })
295
+ )
296
+ }
297
+
298
+ SKF.prototype.SKF_GetFileInfo = function (Application, FileName) {
299
+ return postInvokeSrv(
300
+ 'SKF_GetFileInfo',
301
+ JSON.stringify({
302
+ Application: Application,
303
+ FileName: FileName
304
+ })
305
+ )
306
+ }
307
+
308
+ SKF.prototype.SKF_ReadFile = function (Application, FileName, Offset, Size) {
309
+ return postInvokeSrv(
310
+ 'SKF_ReadFile',
311
+ JSON.stringify({
312
+ Application: Application,
313
+ FileName: FileName,
314
+ Offset: Offset,
315
+ Size: Size
316
+ })
317
+ )
318
+ }
319
+
320
+ SKF.prototype.SKF_WriteFile = function (Application, FileName, Offset, Data, Size) {
321
+ return postInvokeSrv(
322
+ 'SKF_WriteFile',
323
+ JSON.stringify({
324
+ Application: Application,
325
+ FileName: FileName,
326
+ Offset: Offset,
327
+ Data: Data,
328
+ Size: Size
329
+ })
330
+ )
331
+ }
332
+
333
+ SKF.prototype.SKF_CreateContainer = function (Application, ContainerName) {
334
+ return postInvokeSrv(
335
+ 'SKF_CreateContainer',
336
+ JSON.stringify({
337
+ Application: Application,
338
+ ContainerName: ContainerName
339
+ })
340
+ )
341
+ }
342
+
343
+ SKF.prototype.SKF_DeleteContainer = function (Application, ContainerName) {
344
+ return postInvokeSrv(
345
+ 'SKF_DeleteContainer',
346
+ JSON.stringify({
347
+ Application: Application,
348
+ ContainerName: ContainerName
349
+ })
350
+ )
351
+ }
352
+
353
+ SKF.prototype.SKF_EnumContainer = function (Application) {
354
+ return postInvokeSrv(
355
+ 'SKF_EnumContainer',
356
+ JSON.stringify({
357
+ Application: Application
358
+ })
359
+ )
360
+ }
361
+
362
+ SKF.prototype.SKF_OpenContainer = function (Application, ContainerName) {
363
+ return postInvokeSrv(
364
+ 'SKF_OpenContainer',
365
+ JSON.stringify({
366
+ Application: Application,
367
+ ContainerName: ContainerName
368
+ })
369
+ )
370
+ }
371
+
372
+ SKF.prototype.SKF_CloseContainer = function (Container) {
373
+ return postInvokeSrv(
374
+ 'SKF_CloseContainer',
375
+ JSON.stringify({
376
+ Container: Container
377
+ })
378
+ )
379
+ }
380
+
381
+ SKF.prototype.SKF_GetContainerType = function (Container) {
382
+ return postInvokeSrv(
383
+ 'SKF_GetContainerType',
384
+ JSON.stringify({
385
+ Container: Container
386
+ })
387
+ )
388
+ }
389
+
390
+ SKF.prototype.SKF_ImportCertificate = function (Container, SignFlag, Cert, CertLen) {
391
+ return postInvokeSrv(
392
+ 'SKF_ImportCertificate',
393
+ JSON.stringify({
394
+ Container: Container,
395
+ SignFlag: SignFlag,
396
+ Cert: Cert,
397
+ CertLen: CertLen
398
+ })
399
+ )
400
+ }
401
+
402
+ SKF.prototype.SKF_ExportCertificate = function (Container, SignFlag) {
403
+ return postInvokeSrv(
404
+ 'SKF_ExportCertificate',
405
+ JSON.stringify({
406
+ Container: Container,
407
+ SignFlag: SignFlag
408
+ })
409
+ )
410
+ }
411
+
412
+ SKF.prototype.SKF_GenRandom = function (DevHandle, RandomLen) {
413
+ return postInvokeSrv(
414
+ 'SKF_GenRandom',
415
+ JSON.stringify({
416
+ DevHandle: DevHandle,
417
+ RandomLen: RandomLen
418
+ })
419
+ )
420
+ }
421
+
422
+ SKF.prototype.SKF_GenRSAKeyPair = function (Container, BitsLen) {
423
+ return postInvokeSrv(
424
+ 'SKF_GenRSAKeyPair',
425
+ JSON.stringify({
426
+ Container: Container,
427
+ BitsLen: BitsLen
428
+ })
429
+ )
430
+ }
431
+
432
+ SKF.prototype.SKF_ImportRSAKeyPair = function (
433
+ Container,
434
+ SymAlgId,
435
+ WrappedKey,
436
+ WrappedKeyLen,
437
+ EncryptedData,
438
+ EncryptedDataLen
439
+ ) {
440
+ return postInvokeSrv(
441
+ 'SKF_ImportRSAKeyPair',
442
+ JSON.stringify({
443
+ Container: Container,
444
+ SymAlgId: SymAlgId,
445
+ WrappedKey: WrappedKey,
446
+ WrappedKeyLen: WrappedKeyLen,
447
+ EncryptedData: EncryptedData,
448
+ EncryptedDataLen: EncryptedDataLen
449
+ })
450
+ )
451
+ }
452
+
453
+ SKF.prototype.SKF_RSASignData = function (Container, Data, DataLen) {
454
+ return postInvokeSrv(
455
+ 'SKF_RSASignData',
456
+ JSON.stringify({
457
+ Container: Container,
458
+ Data: Data,
459
+ DataLen: DataLen
460
+ })
461
+ )
462
+ }
463
+
464
+ SKF.prototype.SKF_RSAVerify = function (DevHandle, Publickey, PublickeyLen, Data, DataLen, Signature, SignatureLen) {
465
+ return postInvokeSrv(
466
+ 'SKF_RSAVerify',
467
+ JSON.stringify({
468
+ DevHandle: DevHandle,
469
+ Publickey: Publickey,
470
+ PublickeyLen: PublickeyLen,
471
+ Data: Data,
472
+ DataLen: DataLen,
473
+ Signature: Signature,
474
+ SignatureLen: SignatureLen
475
+ })
476
+ )
477
+ }
478
+
479
+ SKF.prototype.SKF_RSAExportSessionKey = function (Container, AlgId, Publickey, PublickeyLen) {
480
+ return postInvokeSrv(
481
+ 'SKF_RSAExportSessionKey',
482
+ JSON.stringify({
483
+ Container: Container,
484
+ AlgId: AlgId,
485
+ Publickey: Publickey,
486
+ PublickeyLen: PublickeyLen
487
+ })
488
+ )
489
+ }
490
+ /*
491
+ SKF.prototype.SKF_ExtRSAEncrypt = function (DevHandle,Rsapublickey,Rsapublickeylen,Data,DataLen) {
492
+ return postInvokeSrv("SKF_ExtRSAEncrypt", JSON.stringify({
493
+ "DevHandle":DevHandle,
494
+ "Rsapublickey":Rsapublickey,
495
+ "Rsapublickeylen":Rsapublickeylen,
496
+ "Data":Data,
497
+ "DataLen":DataLen
498
+ }));
499
+ };*/
500
+
501
+ SKF.prototype.SKF_GenECCKeyPair = function (Container, AlgId) {
502
+ return postInvokeSrv(
503
+ 'SKF_GenECCKeyPair',
504
+ JSON.stringify({
505
+ Container: Container,
506
+ AlgId: AlgId
507
+ })
508
+ )
509
+ }
510
+
511
+ SKF.prototype.SKF_ImportECCKeyPair = function (
512
+ Container,
513
+ Publickey,
514
+ PublickeyLen,
515
+ EncsessionKey,
516
+ EncsessionKeyLen,
517
+ Encprivatekey,
518
+ EncprivatekeyLen
519
+ ) {
520
+ return postInvokeSrv(
521
+ 'SKF_ImportECCKeyPair',
522
+ JSON.stringify({
523
+ Container: Container,
524
+ Publickey: Publickey,
525
+ PublickeyLen: PublickeyLen,
526
+ EncsessionKey: EncsessionKey,
527
+ EncsessionKeyLen: EncsessionKeyLen,
528
+ Encprivatekey: Encprivatekey,
529
+ EncprivatekeyLen: EncprivatekeyLen
530
+ })
531
+ )
532
+ }
533
+
534
+ SKF.prototype.SKF_ECCSignData = function (Container, Data, DataLen) {
535
+ return postInvokeSrv(
536
+ 'SKF_ECCSignData',
537
+ JSON.stringify({
538
+ Container: Container,
539
+ Data: Data,
540
+ DataLen: DataLen
541
+ })
542
+ )
543
+ }
544
+
545
+ SKF.prototype.SKF_ECCVerify = function (DevHandle, Publickey, PublickeyLen, Data, DataLen, Signature, SignatureLen) {
546
+ return postInvokeSrv(
547
+ 'SKF_ECCVerify',
548
+ JSON.stringify({
549
+ DevHandle: DevHandle,
550
+ Publickey: Publickey,
551
+ PublickeyLen: PublickeyLen,
552
+ Data: Data,
553
+ DataLen: DataLen,
554
+ Signature: Signature,
555
+ SignatureLen: SignatureLen
556
+ })
557
+ )
558
+ }
559
+
560
+ SKF.prototype.SKF_ECCExportSessionKey = function (Container, AlgId, Publickey, PublickeyLen) {
561
+ return postInvokeSrv(
562
+ 'SKF_ECCExportSessionKey',
563
+ JSON.stringify({
564
+ Container: Container,
565
+ AlgId: AlgId,
566
+ Publickey: Publickey,
567
+ PublickeyLen: PublickeyLen
568
+ })
569
+ )
570
+ }
571
+
572
+ SKF.prototype.SKF_GenerateAgreementDataWithECC = function (Container, AlgId, ID, IDLen) {
573
+ return postInvokeSrv(
574
+ 'SKF_GenerateAgreementDataWithECC',
575
+ JSON.stringify({
576
+ Container: Container,
577
+ AlgId: AlgId,
578
+ ID: ID,
579
+ IDLen: IDLen
580
+ })
581
+ )
582
+ }
583
+
584
+ SKF.prototype.SKF_GenerateAgreementDataAndKeyWithECC = function (
585
+ Container,
586
+ AlgId,
587
+ SponsorECCPubKey,
588
+ SponsorECCPubKeyLen,
589
+ SponsorTempECCPubKey,
590
+ SponsorTempECCPubKeyLen,
591
+ ID,
592
+ IDLen,
593
+ SponsorID,
594
+ SponsorIDLen
595
+ ) {
596
+ return postInvokeSrv(
597
+ 'SKF_GenerateAgreementDataAndKeyWithECC',
598
+ JSON.stringify({
599
+ Container: Container,
600
+ AlgId: AlgId,
601
+ SponsorECCPubKey: SponsorECCPubKey,
602
+ SponsorECCPubKeyLen: SponsorECCPubKeyLen,
603
+ SponsorTempECCPubKey: SponsorTempECCPubKey,
604
+ SponsorTempECCPubKeyLen: SponsorTempECCPubKeyLen,
605
+ ID: ID,
606
+ IDLen: IDLen,
607
+ SponsorID: SponsorID,
608
+ SponsorIDLen: SponsorIDLen
609
+ })
610
+ )
611
+ }
612
+
613
+ SKF.prototype.SKF_GenerateKeyWithECC = function (
614
+ AgreementHandle,
615
+ ECCPubKey,
616
+ ECCPubKeyLen,
617
+ TempECCPubKey,
618
+ TempECCPubKeyLen,
619
+ ID,
620
+ IDLen
621
+ ) {
622
+ return postInvokeSrv(
623
+ 'SKF_GenerateKeyWithECC',
624
+ JSON.stringify({
625
+ AgreementHandle: AgreementHandle,
626
+ ECCPubKey: ECCPubKey,
627
+ ECCPubKeyLen: ECCPubKeyLen,
628
+ TempECCPubKey: TempECCPubKey,
629
+ TempECCPubKeyLen: TempECCPubKeyLen,
630
+ ID: ID,
631
+ IDLen: IDLen
632
+ })
633
+ )
634
+ }
635
+
636
+ SKF.prototype.SKF_ExportPublicKey = function (Container, SignFlag) {
637
+ return postInvokeSrv(
638
+ 'SKF_ExportPublicKey',
639
+ JSON.stringify({
640
+ Container: Container,
641
+ SignFlag: SignFlag
642
+ })
643
+ )
644
+ }
645
+
646
+ SKF.prototype.SKF_ExtECCEncrypt = function (DevHandle, Publickey, PublickeyLen, PlainText, PlainTextLen) {
647
+ return postInvokeSrv(
648
+ 'SKF_ExtECCEncrypt',
649
+ JSON.stringify({
650
+ DevHandle: DevHandle,
651
+ Publickey: Publickey,
652
+ PublickeyLen: PublickeyLen,
653
+ PlainText: PlainText,
654
+ PlainTextLen: PlainTextLen
655
+ })
656
+ )
657
+ }
658
+
659
+ SKF.prototype.SKF_ImportSessionKey = function (Container, AlgId, WrapedData, WrapedLen) {
660
+ return postInvokeSrv(
661
+ 'SKF_ImportSessionKey',
662
+ JSON.stringify({
663
+ Container: Container,
664
+ AlgId: AlgId,
665
+ WrapedData: WrapedData,
666
+ WrapedLen: WrapedLen
667
+ })
668
+ )
669
+ }
670
+
671
+ SKF.prototype.SKF_EncryptInit = function (KeyHandle, IV, IVLen, PaddingType, FeedBitLen) {
672
+ return postInvokeSrv(
673
+ 'SKF_EncryptInit',
674
+ JSON.stringify({
675
+ KeyHandle: KeyHandle,
676
+ IV: IV,
677
+ IVLen: IVLen,
678
+ PaddingType: PaddingType,
679
+ FeedBitLen: FeedBitLen
680
+ })
681
+ )
682
+ }
683
+
684
+ SKF.prototype.SKF_Encrypt = function (KeyHandle, Data, DataLen) {
685
+ return postInvokeSrv(
686
+ 'SKF_Encrypt',
687
+ JSON.stringify({
688
+ KeyHandle: KeyHandle,
689
+ Data: Data,
690
+ DataLen: DataLen
691
+ })
692
+ )
693
+ }
694
+
695
+ SKF.prototype.SKF_EncryptUpdate = function (KeyHandle, Data, DataLen) {
696
+ return postInvokeSrv(
697
+ 'SKF_EncryptUpdate',
698
+ JSON.stringify({
699
+ KeyHandle: KeyHandle,
700
+ Data: Data,
701
+ DataLen: DataLen
702
+ })
703
+ )
704
+ }
705
+
706
+ SKF.prototype.SKF_EncryptFinal = function (KeyHandle) {
707
+ return postInvokeSrv(
708
+ 'SKF_EncryptFinal',
709
+ JSON.stringify({
710
+ KeyHandle: KeyHandle
711
+ })
712
+ )
713
+ }
714
+
715
+ SKF.prototype.SKF_DecryptInit = function (KeyHandle, IV, IVLen, PaddingType, FeedBitLen) {
716
+ return postInvokeSrv(
717
+ 'SKF_DecryptInit',
718
+ JSON.stringify({
719
+ KeyHandle: KeyHandle,
720
+ IV: IV,
721
+ IVLen: IVLen,
722
+ PaddingType: PaddingType,
723
+ FeedBitLen: FeedBitLen
724
+ })
725
+ )
726
+ }
727
+
728
+ SKF.prototype.SKF_Decrypt = function (KeyHandle, EncryptedData, EncryptedDataLen) {
729
+ return postInvokeSrv(
730
+ 'SKF_Decrypt',
731
+ JSON.stringify({
732
+ KeyHandle: KeyHandle,
733
+ EncryptedData: EncryptedData,
734
+ EncryptedDataLen: EncryptedDataLen
735
+ })
736
+ )
737
+ }
738
+
739
+ SKF.prototype.SKF_DecryptUpdate = function (KeyHandle, EncryptedData, EncryptedDataLen) {
740
+ return postInvokeSrv(
741
+ 'SKF_DecryptUpdate',
742
+ JSON.stringify({
743
+ KeyHandle: KeyHandle,
744
+ EncryptedData: EncryptedData,
745
+ EncryptedDataLen: EncryptedDataLen
746
+ })
747
+ )
748
+ }
749
+
750
+ SKF.prototype.SKF_DecryptFinal = function (KeyHandle) {
751
+ return postInvokeSrv(
752
+ 'SKF_DecryptFinal',
753
+ JSON.stringify({
754
+ KeyHandle: KeyHandle
755
+ })
756
+ )
757
+ }
758
+
759
+ SKF.prototype.SKF_DigestInit = function (DevHandle, AlgID, Publickey, PublickeyLen, ID, IDLen) {
760
+ return postInvokeSrv(
761
+ 'SKF_DigestInit',
762
+ JSON.stringify({
763
+ DevHandle: DevHandle,
764
+ AlgID: AlgID,
765
+ Publickey: Publickey,
766
+ PublickeyLen: PublickeyLen,
767
+ ID: ID,
768
+ IDLen: IDLen
769
+ })
770
+ )
771
+ }
772
+
773
+ SKF.prototype.SKF_Digest = function (HashHandle, Data, DataLen) {
774
+ return postInvokeSrv(
775
+ 'SKF_Digest',
776
+ JSON.stringify({
777
+ HashHandle: HashHandle,
778
+ Data: Data,
779
+ DataLen: DataLen
780
+ })
781
+ )
782
+ }
783
+
784
+ SKF.prototype.SKF_DigestUpdate = function (HashHandle, Data, DataLen) {
785
+ return postInvokeSrv(
786
+ 'SKF_DigestUpdate',
787
+ JSON.stringify({
788
+ HashHandle: HashHandle,
789
+ Data: Data,
790
+ DataLen: DataLen
791
+ })
792
+ )
793
+ }
794
+
795
+ SKF.prototype.SKF_DigestFinal = function (HashHandle) {
796
+ return postInvokeSrv(
797
+ 'SKF_DigestFinal',
798
+ JSON.stringify({
799
+ HashHandle: HashHandle
800
+ })
801
+ )
802
+ }
803
+
804
+ SKF.prototype.SKF_MacInit = function (KeyHandle, IV, IVLen, PaddingType, FeedBitLen) {
805
+ return postInvokeSrv(
806
+ 'SKF_MacInit',
807
+ JSON.stringify({
808
+ KeyHandle: KeyHandle,
809
+ IV: IV,
810
+ IVLen: IVLen,
811
+ PaddingType: PaddingType,
812
+ FeedBitLen: FeedBitLen
813
+ })
814
+ )
815
+ }
816
+
817
+ SKF.prototype.SKF_Mac = function (MacHandle, Data, DataLen) {
818
+ return postInvokeSrv(
819
+ 'SKF_Mac',
820
+ JSON.stringify({
821
+ MacHandle: MacHandle,
822
+ Data: Data,
823
+ DataLen: DataLen
824
+ })
825
+ )
826
+ }
827
+
828
+ SKF.prototype.SKF_MacUpdate = function (MacHandle, Data, DataLen) {
829
+ return postInvokeSrv(
830
+ 'SKF_MacUpdate',
831
+ JSON.stringify({
832
+ MacHandle: MacHandle,
833
+ Data: Data,
834
+ DataLen: DataLen
835
+ })
836
+ )
837
+ }
838
+
839
+ SKF.prototype.SKF_MacFinal = function (MacHandle) {
840
+ return postInvokeSrv(
841
+ 'SKF_MacFinal',
842
+ JSON.stringify({
843
+ MacHandle: MacHandle
844
+ })
845
+ )
846
+ }
847
+
848
+ SKF.prototype.SKF_CloseHandle = function (Handle) {
849
+ return postInvokeSrv(
850
+ 'SKF_CloseHandle',
851
+ JSON.stringify({
852
+ Handle: Handle
853
+ })
854
+ )
855
+ }
856
+
857
+ SKF.prototype.SKF_SetSymmKey = function (DevHandle, Key, AlgID) {
858
+ return postInvokeSrv(
859
+ 'SKF_SetSymmKey',
860
+ JSON.stringify({
861
+ DevHandle: DevHandle,
862
+ Key: Key,
863
+ AlgID: AlgID
864
+ })
865
+ )
866
+ }
867
+
868
+ SKF.prototype.SKF_ParseCert = function (Cert) {
869
+ return postInvokeSrv(
870
+ 'SKF_ParseCert',
871
+ JSON.stringify({
872
+ Cert: Cert
873
+ })
874
+ )
875
+ }
876
+
877
+ SKF.prototype.SKF_GenCertificateRequest = function (Container, Dn, Csrtype, AsymAlg, BitsLen) {
878
+ return postInvokeSrv(
879
+ 'SKF_GenCertificateRequest',
880
+ JSON.stringify({
881
+ Container: Container,
882
+ Dn: Dn,
883
+ Csrtype: Csrtype,
884
+ AsymAlg: AsymAlg,
885
+ BitsLen: BitsLen
886
+ })
887
+ )
888
+ }
889
+
890
+ SKF.prototype.ExternalDilithiumInlineSign = function (DevHandle, KeyID, Data) {
891
+ return postInvokeSrv(
892
+ 'ExternalDilithiumInlineSign',
893
+ JSON.stringify({
894
+ DevHandle: DevHandle,
895
+ KeyID: KeyID,
896
+ Data: Data
897
+ })
898
+ )
899
+ }
900
+
901
+ SKF.prototype.ExternalVerify_Dilithium = function (
902
+ DevHandle,
903
+ KeyIndex,
904
+ Publickey,
905
+ AlgID,
906
+ SecurityLevel,
907
+ Data,
908
+ Signature
909
+ ) {
910
+ return postInvokeSrv(
911
+ 'ExternalVerify_Dilithium',
912
+ JSON.stringify({
913
+ DevHandle: DevHandle,
914
+ KeyIndex: KeyIndex,
915
+ Publickey: Publickey,
916
+ AlgID: AlgID,
917
+ SecurityLevel: SecurityLevel,
918
+ Data: Data,
919
+ Signature: Signature
920
+ })
921
+ )
922
+ }
923
+
924
+ SKF.prototype.SKF_PKCS7SignData = function (Container, Data) {
925
+ return postInvokeSrv(
926
+ 'Pkcs7Sign',
927
+ JSON.stringify({
928
+ Container,
929
+ Data
930
+ })
931
+ )
932
+ }
933
+
934
+ return SKF
935
+ })()
936
+
937
+ export default SKF