n20-common-lib 1.3.46 → 1.3.49
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/README.md +2 -2
- package/g6.js +2 -2
- package/nstc-g6/assets/svg/addFile.svg +31 -31
- package/nstc-g6/assets/svg/deleteFile.svg +27 -27
- package/nstc-g6/assets/svg/filter.svg +15 -15
- package/nstc-g6/assets/svg/filterActive.svg +16 -16
- package/nstc-g6/assets/svg/hourglass.svg +18 -18
- package/nstc-g6/assets/svg/newsearch.svg +18 -18
- package/nstc-g6/assets/svg/searchActive.svg +18 -18
- package/nstc-g6/components/Calendar/index.js +8 -8
- package/nstc-g6/components/Calendar/src/basic/month-table.vue +129 -129
- package/nstc-g6/components/Calendar/src/basic/year-table.vue +126 -126
- package/nstc-g6/components/Calendar/src/main.vue +442 -442
- package/nstc-g6/components/DialogForm/index.js +8 -8
- package/nstc-g6/components/DialogForm/src/demo/index.vue +56 -56
- package/nstc-g6/components/DialogForm/src/main.vue +189 -189
- package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +280 -280
- package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1222 -1222
- package/nstc-g6/components/Form/A_DEMO/index.vue +803 -803
- package/nstc-g6/components/Form/AutocompleteCustom/index.vue +72 -72
- package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +191 -191
- package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +128 -128
- package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +233 -233
- package/nstc-g6/components/Form/BusinessSpecific/readme.md +7 -7
- package/nstc-g6/components/Form/CascaderCustom/index.vue +101 -101
- package/nstc-g6/components/Form/CheckboxCustom/index.vue +84 -84
- package/nstc-g6/components/Form/Component.vue +661 -661
- package/nstc-g6/components/Form/ComponentSecond.vue +650 -650
- package/nstc-g6/components/Form/DatepickerCustom/index.vue +130 -130
- package/nstc-g6/components/Form/InputAndDialog/index.js +15 -15
- package/nstc-g6/components/Form/InputAndDialog/src/main.vue +394 -394
- package/nstc-g6/components/Form/InputCustom/demo/index.vue +65 -65
- package/nstc-g6/components/Form/InputCustom/index.vue +307 -307
- package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +31 -31
- package/nstc-g6/components/Form/IntervalinputCustom/index.vue +118 -118
- package/nstc-g6/components/Form/Item.vue +330 -330
- package/nstc-g6/components/Form/ItemSecond.vue +269 -269
- package/nstc-g6/components/Form/List.vue +146 -146
- package/nstc-g6/components/Form/ListSecond.vue +130 -130
- package/nstc-g6/components/Form/RadioCustom/index.vue +73 -73
- package/nstc-g6/components/Form/SelectAccount/index.js +15 -15
- package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +57 -57
- package/nstc-g6/components/Form/SelectAccount/src/main.vue +282 -282
- package/nstc-g6/components/Form/SelectAndDialog/index.js +15 -15
- package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +383 -383
- package/nstc-g6/components/Form/SelectCashFlow/index.js +15 -15
- package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +41 -41
- package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +125 -125
- package/nstc-g6/components/Form/SelectCustom/demo/index.vue +82 -82
- package/nstc-g6/components/Form/SelectCustom/index.vue +488 -488
- package/nstc-g6/components/Form/SelectSubject/index.js +15 -15
- package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +84 -84
- package/nstc-g6/components/Form/SelectSubject/src/main.vue +181 -181
- package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +188 -188
- package/nstc-g6/components/Form/SelectindialogCustom/index.vue +650 -650
- package/nstc-g6/components/Form/SelectindialogCustom/install.js +6 -6
- package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +53 -53
- package/nstc-g6/components/Form/TableRadioCustom/index.vue +183 -183
- package/nstc-g6/components/Form/TextCustom/index.vue +38 -38
- package/nstc-g6/components/Form/UploadCustom/demo/index.vue +31 -31
- package/nstc-g6/components/Form/UploadCustom/index.vue +506 -506
- package/nstc-g6/components/Form/configs.js +191 -191
- package/nstc-g6/components/Form/configsSecond.js +161 -161
- package/nstc-g6/components/Form/index.js +8 -8
- package/nstc-g6/components/Form/index.scss +29 -29
- package/nstc-g6/components/Form/payeePersonSelect/index.js +15 -15
- package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +163 -163
- package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +184 -184
- package/nstc-g6/components/Form/readme.txt +4 -4
- package/nstc-g6/components/FormGroup/index.js +8 -8
- package/nstc-g6/components/FormGroup/src/demo/config.js +23 -23
- package/nstc-g6/components/FormGroup/src/demo/index.vue +85 -85
- package/nstc-g6/components/FormGroup/src/main.vue +639 -639
- package/nstc-g6/components/FormGroup/src/validate.js +22 -22
- package/nstc-g6/components/InputTag/InputTag.vue +269 -269
- package/nstc-g6/components/NstcApprovel/NstcApprovel.vue +24 -24
- package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +150 -150
- package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +123 -123
- package/nstc-g6/components/NstcCharts/NstcCharts.vue +162 -162
- package/nstc-g6/components/NstcCharts/define.js +74 -74
- package/nstc-g6/components/NstcCharts/mixins/resize.js +56 -56
- package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +152 -152
- package/nstc-g6/components/NstcConfirm/index.js +24 -24
- package/nstc-g6/components/NstcDialog/NstcDialog.vue +184 -184
- package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +175 -175
- package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +280 -280
- package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +52 -52
- package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +396 -396
- package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +711 -711
- package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +475 -475
- package/nstc-g6/components/NstcExcelExport/NstcExcelExport.vue +145 -145
- package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +1074 -1074
- package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +1166 -1166
- package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +130 -130
- package/nstc-g6/components/NstcExpandCollapse/index.scss +77 -77
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +989 -989
- package/nstc-g6/components/NstcFileUpload/img/addFile.svg +31 -31
- package/nstc-g6/components/NstcFileUpload/img/delete.svg +23 -23
- package/nstc-g6/components/NstcFileUpload/img/deleteFile.svg +27 -27
- package/nstc-g6/components/NstcFileUpload/img/download.svg +23 -23
- package/nstc-g6/components/NstcFileUpload/img/inputUpload.svg +29 -29
- package/nstc-g6/components/NstcFileUpload/img/look-diabled.svg +23 -23
- package/nstc-g6/components/NstcFileUpload/img/look.svg +23 -23
- package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +280 -280
- package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1222 -1222
- package/nstc-g6/components/NstcForm/A_DEMO/index.vue +796 -796
- package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +68 -68
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputMultiple.vue +189 -189
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +128 -128
- package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +233 -233
- package/nstc-g6/components/NstcForm/BusinessSpecific/readme.md +7 -7
- package/nstc-g6/components/NstcForm/CascaderCustom/index.vue +101 -101
- package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +84 -84
- package/nstc-g6/components/NstcForm/Component.vue +684 -684
- package/nstc-g6/components/NstcForm/ComponentSecond.vue +650 -650
- package/nstc-g6/components/NstcForm/DatepickerCustom/index.vue +130 -130
- package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +389 -389
- package/nstc-g6/components/NstcForm/InputCustom/index.vue +313 -313
- package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +111 -111
- package/nstc-g6/components/NstcForm/Item.vue +327 -327
- package/nstc-g6/components/NstcForm/ItemSecond.vue +269 -269
- package/nstc-g6/components/NstcForm/List.vue +146 -146
- package/nstc-g6/components/NstcForm/ListSecond.vue +130 -130
- package/nstc-g6/components/NstcForm/RadioCustom/index.vue +73 -73
- package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +334 -334
- package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +377 -377
- package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +122 -122
- package/nstc-g6/components/NstcForm/SelectCustom/index.vue +460 -460
- package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +184 -184
- package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +648 -648
- package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +183 -183
- package/nstc-g6/components/NstcForm/TextCustom/index.vue +38 -38
- package/nstc-g6/components/NstcForm/UploadCustom/index.vue +500 -500
- package/nstc-g6/components/NstcForm/configs.js +191 -191
- package/nstc-g6/components/NstcForm/configsSecond.js +161 -161
- package/nstc-g6/components/NstcForm/index.js +8 -8
- package/nstc-g6/components/NstcForm/index.scss +29 -29
- package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +187 -187
- package/nstc-g6/components/NstcForm/readme.txt +4 -4
- package/nstc-g6/components/NstcPagination/NstcPagination.vue +428 -428
- package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +70 -70
- package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +730 -730
- package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +677 -677
- package/nstc-g6/components/NstcSticky/NstcSticky.vue +97 -97
- package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +72 -72
- package/nstc-g6/components/NstcTab/NstcTab.vue +80 -80
- package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +45 -45
- package/nstc-g6/components/NstcTabWithBadge/index.scss +31 -31
- package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +292 -292
- package/nstc-g6/components/NstcTable/NstcTable.vue +460 -460
- package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +802 -802
- package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +186 -186
- package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +328 -328
- package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +145 -145
- package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +180 -180
- package/nstc-g6/components/Search/NstcSearch.vue +583 -583
- package/nstc-g6/components/Search/src/demo/index copy.vue +101 -101
- package/nstc-g6/components/Search/src/demo/index.vue +103 -103
- package/nstc-g6/components/Search/src/main copy.vue +607 -607
- package/nstc-g6/components/approvelTwo/main.vue +220 -220
- package/nstc-g6/components/approvelTwo/progress.vue +154 -154
- package/nstc-g6/directives/VCopy/index.js +59 -59
- package/nstc-g6/directives/VNstcNumber/index.js +14 -14
- package/nstc-g6/directives/VNstcNumber/temp.js +446 -446
- package/nstc-g6/index.js +193 -193
- package/nstc-g6/utils/auth.js +2 -2
- package/nstc-g6/utils/axios.js +2 -2
- package/nstc-g6/utils/dateAndValidator.js +649 -649
- package/nstc-g6/utils/debounce.js +40 -40
- package/nstc-g6/utils/mapper_aims.js +809 -809
- package/nstc-g6/utils/parseTime.js +48 -48
- package/nstc-g6/utils/validate/index.js +6 -6
- package/nstc-g6/utils/vendor/Export2Excel.js +229 -229
- package/nstc-g6/utils/vendor/Export2Zip.js +24 -24
- package/nstc-g6/utils/vue-bus.js +4 -4
- package/package.json +103 -103
- package/src/_qiankun/index.js +113 -113
- package/src/_qiankun/postMessage.js +24 -24
- package/src/assets/css/_coreLib.scss +43 -43
- package/src/assets/css/alert.scss +28 -28
- package/src/assets/css/cl-anchor.scss +70 -70
- package/src/assets/css/cl-approve-card.scss +68 -68
- package/src/assets/css/cl-dialog.scss +113 -113
- package/src/assets/css/cl-drag-list.scss +24 -24
- package/src/assets/css/cl-empty.scss +10 -10
- package/src/assets/css/cl-expandable-pane.scss +37 -37
- package/src/assets/css/cl-expandable.scss +27 -27
- package/src/assets/css/cl-file-upload-table.scss +31 -31
- package/src/assets/css/cl-filter.scss +4 -4
- package/src/assets/css/cl-flow-step.scss +185 -185
- package/src/assets/css/cl-footer-box.scss +10 -10
- package/src/assets/css/cl-form-item.scss +729 -729
- package/src/assets/css/cl-general-card.scss +11 -11
- package/src/assets/css/cl-layout-aside.scss +92 -92
- package/src/assets/css/cl-layout-content.scss +16 -16
- package/src/assets/css/cl-layout-header.scss +89 -89
- package/src/assets/css/cl-layout-tabs.scss +87 -87
- package/src/assets/css/cl-layout.scss +97 -97
- package/src/assets/css/cl-login-temporary.scss +37 -37
- package/src/assets/css/cl-message.scss +159 -159
- package/src/assets/css/cl-more-tab.scss +98 -98
- package/src/assets/css/cl-nav-menu.scss +5 -5
- package/src/assets/css/cl-pagination.scss +130 -130
- package/src/assets/css/cl-secondary-tab.scss +53 -53
- package/src/assets/css/cl-showcolumn.scss +40 -40
- package/src/assets/css/cl-sifting.scss +51 -51
- package/src/assets/css/cl-statis.scss +54 -54
- package/src/assets/css/cl-step.scss +73 -73
- package/src/assets/css/cl-suspend.scss +19 -19
- package/src/assets/css/cl-tertiary-tab.scss +56 -56
- package/src/assets/css/cl-upload.scss +52 -52
- package/src/assets/css/cl-worn-pagination.scss +50 -50
- package/src/assets/css/el-button.scss +186 -186
- package/src/assets/css/el-table.scss +88 -88
- package/src/assets/css/element-variables.scss +1061 -1061
- package/src/assets/css/element.dev.scss +22 -22
- package/src/assets/css/font-icon.scss +26 -26
- package/src/assets/css/index.dev.scss +4 -4
- package/src/assets/css/index.scss +11 -11
- package/src/assets/css/normalize.scss +845 -845
- package/src/assets/css/plain-text.scss +36 -36
- package/src/assets/css/rootvar.scss +143 -143
- package/src/assets/css/select.scss +25 -25
- package/src/assets/css/title-pop.scss +23 -23
- package/src/assets/getJsonc.js +53 -53
- package/src/assets/iconFont/demo.css +539 -539
- package/src/assets/iconFont/demo_index.html +1614 -1614
- package/src/assets/iconFont/iconfont.css +263 -263
- package/src/assets/iconFont/iconfont.json +443 -443
- package/src/assets/realUrl.js +13 -13
- package/src/components/Anchor/AnchorItem.vue +30 -30
- package/src/components/Anchor/index.vue +208 -208
- package/src/components/ApprovalButtons/index.vue +240 -240
- package/src/components/ApprovalCard/index.vue +132 -132
- package/src/components/ApprovalRecord/approvalImg.vue +39 -39
- package/src/components/ApprovalRecord/approvalImgPro.vue +424 -424
- package/src/components/ApprovalRecord/flowDialog.vue +47 -47
- package/src/components/ApprovalRecord/index.vue +63 -63
- package/src/components/Button/button-group.vue +148 -148
- package/src/components/Button/icon-group-button.vue +63 -63
- package/src/components/Button/index.vue +56 -56
- package/src/components/CascaderArea/index.vue +103 -103
- package/src/components/ChildRange/index.vue +169 -169
- package/src/components/ChildRange/style.scss +34 -34
- package/src/components/ContentLoading/index.vue +41 -41
- package/src/components/ContentNull/index.vue +19 -19
- package/src/components/DatePicker/index.vue +33 -33
- package/src/components/DatePicker/por.vue +171 -171
- package/src/components/Descriptions/index.vue +42 -42
- package/src/components/Dialog/index.vue +26 -26
- package/src/components/Dialog/indexO.vue +116 -116
- package/src/components/DragList/index.vue +79 -79
- package/src/components/ECharts/define.js +74 -74
- package/src/components/ECharts/index.vue +170 -170
- package/src/components/ECharts/mixins/resize.js +23 -23
- package/src/components/Empty/img/400.svg +101 -101
- package/src/components/Empty/img/401.svg +101 -101
- package/src/components/Empty/img/403.svg +101 -101
- package/src/components/Empty/img/405.svg +101 -101
- package/src/components/Empty/img/901.svg +95 -95
- package/src/components/Empty/img/902.svg +95 -95
- package/src/components/Empty/img/903.svg +95 -95
- package/src/components/Empty/img/904.svg +95 -95
- package/src/components/Empty/img/905.svg +95 -95
- package/src/components/Empty/img/906.svg +95 -95
- package/src/components/Empty/img/907.svg +95 -95
- package/src/components/Empty/img/abnormal.svg +108 -108
- package/src/components/Empty/img/dispose.svg +71 -71
- package/src/components/Empty/img/empty.svg +57 -57
- package/src/components/Empty/img/general.svg +58 -58
- package/src/components/Empty/img/lock.svg +57 -57
- package/src/components/Empty/img/network.svg +59 -59
- package/src/components/Empty/img/relevant.svg +68 -68
- package/src/components/Empty/img/search.svg +72 -72
- package/src/components/Empty/index.vue +147 -147
- package/src/components/EventBubble/demo/a.vue +29 -29
- package/src/components/EventBubble/demo/b.vue +12 -12
- package/src/components/EventBubble/demo/c.vue +18 -18
- package/src/components/EventBubble/index.vue +57 -57
- package/src/components/Expandable/index.vue +49 -49
- package/src/components/Expandable/main.vue +64 -64
- package/src/components/FileExportAsync/index.vue +191 -191
- package/src/components/FileImport/index.vue +108 -108
- package/src/components/FileUploadTable/index.vue +583 -583
- package/src/components/Filters/form-item-input.vue +185 -185
- package/src/components/Filters/index.vue +216 -216
- package/src/components/Filters/indexO.vue +106 -106
- package/src/components/FlowStep/index.vue +92 -92
- package/src/components/FooterBox/index.vue +21 -21
- package/src/components/GeneralCard/index.vue +15 -15
- package/src/components/InputNumber/index.vue +184 -184
- package/src/components/InputNumber/numberRange.vue +62 -62
- package/src/components/InputSearch/index.vue +79 -75
- package/src/components/Layout/AsideNav/index.vue +120 -120
- package/src/components/Layout/AsideNav/menuItem.vue +34 -34
- package/src/components/Layout/AsideNav/submenuTitle.vue +26 -26
- package/src/components/Layout/HeaderWrap/changePwd.vue +215 -215
- package/src/components/Layout/HeaderWrap/index.vue +412 -412
- package/src/components/Layout/HeaderWrap/noticePop.vue +316 -316
- package/src/components/Layout/SubContent/index.vue +127 -127
- package/src/components/Layout/TabsNav/index.vue +169 -169
- package/src/components/Layout/index.vue +518 -518
- package/src/components/Layout/utils.js +12 -12
- package/src/components/LoginTemporary/form.vue +581 -581
- package/src/components/LoginTemporary/index.vue +198 -198
- package/src/components/LoginTemporary/qrcode.vue +92 -92
- package/src/components/LoginTemporary/retrievePw.vue +375 -375
- package/src/components/LoginTemporary/utils.js +73 -73
- package/src/components/MicroApp/index.js +67 -67
- package/src/components/MicroFrame/index.vue +95 -95
- package/src/components/MoreTab/index.vue +229 -229
- package/src/components/NavMenu/index.vue +60 -60
- package/src/components/PageHeader/index.vue +39 -39
- package/src/components/PageHeader/style.scss +44 -44
- package/src/components/PageLayout/page.vue +15 -15
- package/src/components/Pagination/index.vue +165 -165
- package/src/components/SecondaryTab/index.vue +57 -57
- package/src/components/SelectLazy/index.vue +75 -75
- package/src/components/SelectTree/SelectTreeLazy.vue +241 -241
- package/src/components/SelectTree/index.vue +206 -206
- package/src/components/ShowColumn/index.vue +252 -252
- package/src/components/Sifting/index.vue +98 -98
- package/src/components/Stamp/index.vue +75 -75
- package/src/components/Statis/index.vue +113 -113
- package/src/components/Statis/statisItem.vue +65 -65
- package/src/components/Statis/statisPopover.vue +63 -63
- package/src/components/Step/index.vue +37 -37
- package/src/components/Suspend/index.vue +72 -72
- package/src/components/Table/filters.js +60 -60
- package/src/components/Table/index.vue +89 -89
- package/src/components/Table/indexO.vue +149 -149
- package/src/components/TableOperateColumn/OperateBtns.vue +86 -86
- package/src/components/TableOperateColumn/index.vue +26 -26
- package/src/components/Task/index.vue +26 -26
- package/src/components/TertiaryTab/index.vue +62 -62
- package/src/components/TimePicker/index.vue +28 -28
- package/src/components/Upload/index.vue +280 -280
- package/src/components/Upload/uploadMsg.vue +114 -114
- package/src/components/WornPagination/index.vue +73 -73
- package/src/directives/VClickOutside/index.js +27 -27
- package/src/directives/VHas/index.js +58 -58
- package/src/directives/VMove/index.js +42 -42
- package/src/directives/VRuleKey/index.js +201 -201
- package/src/directives/VTitle/index.js +109 -109
- package/src/index.js +265 -265
- package/src/plugins/CompatibleOld/index.js +11 -11
- package/src/plugins/Print/index.js +4 -4
- package/src/plugins/Print/print-js/.babelrc +12 -12
- package/src/plugins/Print/print-js/LICENSE +21 -21
- package/src/plugins/Print/print-js/README.md +98 -98
- package/src/plugins/Print/print-js/dist/print.css +96 -96
- package/src/plugins/Print/print-js/dist/print.js +990 -990
- package/src/plugins/Print/print-js/package.json +60 -60
- package/src/plugins/Print/print-js/src/index.d.ts +45 -45
- package/src/plugins/Print/print-js/src/index.js +10 -10
- package/src/plugins/Print/print-js/src/js/browser.js +33 -33
- package/src/plugins/Print/print-js/src/js/functions.js +103 -103
- package/src/plugins/Print/print-js/src/js/html.js +70 -70
- package/src/plugins/Print/print-js/src/js/image.js +48 -48
- package/src/plugins/Print/print-js/src/js/init.js +168 -168
- package/src/plugins/Print/print-js/src/js/json.js +109 -109
- package/src/plugins/Print/print-js/src/js/modal.js +62 -62
- package/src/plugins/Print/print-js/src/js/pdf.js +62 -62
- package/src/plugins/Print/print-js/src/js/print.js +102 -102
- package/src/plugins/Print/print-js/src/js/raw-html.js +15 -15
- package/src/plugins/Print/print-js/src/sass/index.scss +13 -13
- package/src/plugins/Print/print-js/src/sass/modules/_colors.scss +9 -9
- package/src/plugins/Print/print-js/src/sass/partials/_modal.scss +40 -40
- package/src/plugins/Print/print-js/src/sass/partials/_spinner.scss +45 -45
- package/src/plugins/Print/print.js +2 -2
- package/src/plugins/Print/print.scss +1 -1
- package/src/plugins/SetMenuTree/index.vue +41 -41
- package/src/plugins/SetMenuTree/logoIcon.vue +37 -37
- package/src/plugins/SetMenuTree/setmenutree.vue +427 -427
- package/src/plugins/SetMenuTree/utils.js +74 -74
- package/src/plugins/Sign/InfosecNetSignCNGAgent.min.js +2000 -2000
- package/src/plugins/Sign/bjca/XTXSAB.js +2395 -2395
- package/src/plugins/Sign/bjca/index.js +129 -129
- package/src/plugins/Sign/index.js +28 -28
- package/src/plugins/Sign/sign.js +108 -64
- package/src/plugins/setTabsForSub.js +2 -2
- package/src/utils/auth.js +56 -56
- package/src/utils/axios.js +205 -205
- package/src/utils/downloadBlob.js +19 -19
- package/src/utils/forEachs.js +16 -16
- package/src/utils/getScrollContainer.js +43 -43
- package/src/utils/handleTab.js +109 -109
- package/src/utils/i18n/cn2hk.json +1270 -1270
- package/src/utils/i18n/index.js +50 -50
- package/src/utils/importGlobal.js +16 -16
- package/src/utils/list2tree.js +36 -36
- package/src/utils/msgboxPor.js +26 -26
- package/src/utils/print.js +161 -161
- package/src/utils/relaNo.js +72 -72
- package/src/utils/repairElementUI.js +169 -169
- package/src/utils/tableheaderFilterpanel.vue +248 -248
- package/src/utils/theme.config.js +22 -22
- package/src/utils/theme.js +31 -31
- package/src/utils/toExcel.js +103 -103
- package/src/utils/urlToGo.js +82 -82
- package/src/utils/xls2json.js +44 -44
- package/src/utils/xlsx2json.js +28 -28
|
@@ -1,2395 +1,2395 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
/*--------------------------------------------------------------------------
|
|
4
|
-
*
|
|
5
|
-
* BJCA Adaptive Javascript, Version SAB(Support All Browsers :))
|
|
6
|
-
* This script support bjca client version 2.0 and later
|
|
7
|
-
* Author:BJCA-zys
|
|
8
|
-
*--------------------------------------------------------------------------*/
|
|
9
|
-
|
|
10
|
-
/* globals var */
|
|
11
|
-
var $_$softCertListID = '' // Soft CertListID, Set by SetUserCertList
|
|
12
|
-
var $_$hardCertListID = '' // USBKeyCertListID, Set by SetUserCertList
|
|
13
|
-
var $_$allCertListID = '' // All CertListID, Set by SetUserCertList
|
|
14
|
-
var $_$loginCertID = '' // logined CertID, Set by SetAutoLogoutParameter
|
|
15
|
-
var $_$logoutFunc = null // logout Function, Set by SetAutoLogoutParameter
|
|
16
|
-
var $_$onUsbKeyChangeCallBackFunc = null //custom onUsbkeyChange callback function
|
|
17
|
-
var $_$XTXAlert = null // alert custom function
|
|
18
|
-
var $_$XTXAppObj = null // XTXAppCOM class Object
|
|
19
|
-
var $_$SecXV2Obj = null // BJCASecCOMV2 class Object
|
|
20
|
-
var $_$SecXObj = null // BJCASecCOM class Object
|
|
21
|
-
var $_$WebSocketObj = null // WebSocket class Object
|
|
22
|
-
var $_$CurrentObj = null // Current use class Object
|
|
23
|
-
var $_$GetPicObj = null // GetKeyPic class Object
|
|
24
|
-
|
|
25
|
-
// const var
|
|
26
|
-
var CERT_TYPE_HARD = 1
|
|
27
|
-
var CERT_TYPE_SOFT = 2
|
|
28
|
-
var CERT_TYPE_ALL = 3
|
|
29
|
-
|
|
30
|
-
// const var
|
|
31
|
-
var CERT_OID_VERSION = 1
|
|
32
|
-
var CERT_OID_SERIAL = 2
|
|
33
|
-
var CERT_OID_SIGN_METHOD = 3
|
|
34
|
-
var CERT_OID_ISSUER_C = 4
|
|
35
|
-
var CERT_OID_ISSUER_O = 5
|
|
36
|
-
var CERT_OID_ISSUER_OU = 6
|
|
37
|
-
var CERT_OID_ISSUER_ST = 7
|
|
38
|
-
var CERT_OID_ISSUER_CN = 8
|
|
39
|
-
var CERT_OID_ISSUER_L = 9
|
|
40
|
-
var CERT_OID_ISSUER_E = 10
|
|
41
|
-
var CERT_OID_NOT_BEFORE = 11
|
|
42
|
-
var CERT_OID_NOT_AFTER = 12
|
|
43
|
-
var CERT_OID_SUBJECT_C = 13
|
|
44
|
-
var CERT_OID_SUBJECT_O = 14
|
|
45
|
-
var CERT_OID_SUBJECT_OU = 15
|
|
46
|
-
var CERT_OID_SUBJECT_ST = 16
|
|
47
|
-
var CERT_OID_SUBJECT_CN = 17
|
|
48
|
-
var CERT_OID_SUBJECT_L = 18
|
|
49
|
-
var CERT_OID_SUBJECT_E = 19
|
|
50
|
-
var CERT_OID_PUBKEY = 20
|
|
51
|
-
var CERT_OID_SUBJECT_DN = 33
|
|
52
|
-
var CERT_OID_ISSUER_DN = 34
|
|
53
|
-
|
|
54
|
-
// set auto logout parameters
|
|
55
|
-
function SetAutoLogoutParameter(strCertID, logoutFunc) {
|
|
56
|
-
$_$loginCertID = strCertID
|
|
57
|
-
$_$logoutFunc = logoutFunc
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function SetLoginCertID(strCertID) {
|
|
62
|
-
$_$loginCertID = strCertID
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function SetLogoutFunction(logoutFunc) {
|
|
67
|
-
$_$logoutFunc = logoutFunc
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function GetDateNotBefore(strCertValid) {
|
|
71
|
-
var strYear = strCertValid.substring(0, 4)
|
|
72
|
-
var strMonth = strCertValid.substring(4, 6)
|
|
73
|
-
var strDay = strCertValid.substring(6, 8)
|
|
74
|
-
var strHour = strCertValid.substring(8, 10)
|
|
75
|
-
var strMin = strCertValid.substring(10, 12)
|
|
76
|
-
var strSecond = strCertValid.substring(12, 14)
|
|
77
|
-
var RtnDate = new Date()
|
|
78
|
-
RtnDate.setFullYear(Number(strYear), Number(strMonth) - 1, Number(strDay))
|
|
79
|
-
RtnDate.setHours(Number(strHour))
|
|
80
|
-
RtnDate.setMinutes(Number(strMin))
|
|
81
|
-
RtnDate.setSeconds(Number(strSecond))
|
|
82
|
-
return RtnDate
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function GetDateNotAfter(strCertValid) {
|
|
86
|
-
var strYear = strCertValid.substring(0, 4)
|
|
87
|
-
var strMonth = strCertValid.substring(4, 6)
|
|
88
|
-
var strDay = strCertValid.substring(6, 8)
|
|
89
|
-
var strHour = strCertValid.substring(8, 10)
|
|
90
|
-
var strMin = strCertValid.substring(10, 12)
|
|
91
|
-
var strSecond = strCertValid.substring(12, 14)
|
|
92
|
-
var RtnDate = new Date()
|
|
93
|
-
RtnDate.setFullYear(Number(strYear), Number(strMonth) - 1, Number(strDay))
|
|
94
|
-
RtnDate.setHours(Number(strHour))
|
|
95
|
-
RtnDate.setMinutes(Number(strMin))
|
|
96
|
-
RtnDate.setSeconds(Number(strSecond))
|
|
97
|
-
return RtnDate
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// set user cert list id
|
|
101
|
-
function SetUserCertList(strListID, certType) {
|
|
102
|
-
if (arguments.length == 1) {
|
|
103
|
-
$_$hardCertListID = strListID
|
|
104
|
-
} else {
|
|
105
|
-
if (certType == CERT_TYPE_HARD) {
|
|
106
|
-
$_$hardCertListID = strListID
|
|
107
|
-
}
|
|
108
|
-
if (certType == CERT_TYPE_SOFT) {
|
|
109
|
-
$_$softCertListID = strListID
|
|
110
|
-
}
|
|
111
|
-
if (certType == CERT_TYPE_ALL) {
|
|
112
|
-
$_$allCertListID = strListID
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
GetUserList($pushAllDropListBox)
|
|
116
|
-
|
|
117
|
-
return
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// set custom usbkeychange callback
|
|
121
|
-
function SetOnUsbKeyChangeCallBack(callback) {
|
|
122
|
-
$_$onUsbKeyChangeCallBackFunc = callback
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// set custom alert function
|
|
126
|
-
function SetAlertFunction(custom_alert) {
|
|
127
|
-
$_$XTXAlert = custom_alert
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function $checkBrowserISIE() {
|
|
131
|
-
return !!(!!window.ActiveXObject || 'ActiveXObject' in window)
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function $popDropListBoxAll(strListID) {
|
|
135
|
-
var objListID = eval(strListID)
|
|
136
|
-
if (objListID == undefined) {
|
|
137
|
-
return
|
|
138
|
-
}
|
|
139
|
-
var i,
|
|
140
|
-
n = objListID.length
|
|
141
|
-
for (i = 0; i < n; i++) {
|
|
142
|
-
objListID.remove(0)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
objListID = null
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function $pushOneDropListBox(userListArray, strListID) {
|
|
149
|
-
var objListID = eval(strListID)
|
|
150
|
-
if (objListID == undefined) {
|
|
151
|
-
return
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
var i
|
|
155
|
-
for (i = 0; i < userListArray.length; i++) {
|
|
156
|
-
var certObj = userListArray[i]
|
|
157
|
-
var objItem = new Option(certObj.certName, certObj.certID)
|
|
158
|
-
objListID.options.add(objItem)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
objListID = null
|
|
162
|
-
|
|
163
|
-
return
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function $pushAllDropListBox(certUserListObj) {
|
|
167
|
-
if ($_$hardCertListID != '') {
|
|
168
|
-
$popDropListBoxAll($_$hardCertListID)
|
|
169
|
-
}
|
|
170
|
-
if ($_$softCertListID != '') {
|
|
171
|
-
$popDropListBoxAll($_$softCertListID)
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
if ($_$allCertListID != '') {
|
|
175
|
-
$popDropListBoxAll($_$allCertListID)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
var strUserList = certUserListObj.retVal
|
|
179
|
-
var allListArray = []
|
|
180
|
-
while (true) {
|
|
181
|
-
var i = strUserList.indexOf('&&&')
|
|
182
|
-
if (i <= 0) {
|
|
183
|
-
break
|
|
184
|
-
}
|
|
185
|
-
var strOneUser = strUserList.substring(0, i)
|
|
186
|
-
var strName = strOneUser.substring(0, strOneUser.indexOf('||'))
|
|
187
|
-
var strCertID = strOneUser.substring(strOneUser.indexOf('||') + 2, strOneUser.length)
|
|
188
|
-
allListArray.push({ certName: strName, certID: strCertID })
|
|
189
|
-
|
|
190
|
-
if ($_$hardCertListID != '') {
|
|
191
|
-
GetDeviceType(
|
|
192
|
-
strCertID,
|
|
193
|
-
function (retObj) {
|
|
194
|
-
if (retObj.retVal == 'HARD') {
|
|
195
|
-
$pushOneDropListBox([retObj.ctx], $_$hardCertListID)
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
{ certName: strName, certID: strCertID }
|
|
199
|
-
)
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
if ($_$softCertListID != '') {
|
|
203
|
-
GetDeviceType(
|
|
204
|
-
strCertID,
|
|
205
|
-
function (retObj) {
|
|
206
|
-
if (retObj.retVal == 'SOFT') {
|
|
207
|
-
$pushOneDropListBox([retObj.ctx], $_$softCertListID)
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
{ certName: strName, certID: strCertID }
|
|
211
|
-
)
|
|
212
|
-
}
|
|
213
|
-
var len = strUserList.length
|
|
214
|
-
strUserList = strUserList.substring(i + 3, len)
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if ($_$allCertListID != '') {
|
|
218
|
-
$pushOneDropListBox(allListArray, $_$allCertListID)
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
function $myAutoLogoutCallBack(retObj) {
|
|
223
|
-
if (retObj.retVal.indexOf($_$loginCertID) <= 0) {
|
|
224
|
-
$_$logoutFunc()
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
//usbkey change default callback function
|
|
229
|
-
function $OnUsbKeyChange() {
|
|
230
|
-
GetUserList($pushAllDropListBox)
|
|
231
|
-
if (typeof $_$onUsbKeyChangeCallBackFunc === 'function') {
|
|
232
|
-
$_$onUsbKeyChangeCallBackFunc()
|
|
233
|
-
}
|
|
234
|
-
if ($_$loginCertID != '' && typeof $_$logoutFunc === 'function') {
|
|
235
|
-
GetUserList($myAutoLogoutCallBack)
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// IE11 attach event
|
|
240
|
-
function $AttachIE11OnUSBKeychangeEvent(strObjName) {
|
|
241
|
-
var handler = document.createElement('script')
|
|
242
|
-
handler.setAttribute('for', strObjName)
|
|
243
|
-
handler.setAttribute('event', 'OnUsbKeyChange')
|
|
244
|
-
handler.appendChild(document.createTextNode('$OnUsbKeyChange()'))
|
|
245
|
-
document.body.appendChild(handler)
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
//load a control
|
|
249
|
-
function $LoadControl(CLSID, ctlName, testFuncName, addEvent) {
|
|
250
|
-
var pluginDiv = document.getElementById('pluginDiv' + ctlName)
|
|
251
|
-
if (pluginDiv) {
|
|
252
|
-
return true
|
|
253
|
-
}
|
|
254
|
-
pluginDiv = document.createElement('div')
|
|
255
|
-
pluginDiv.id = 'pluginDiv' + ctlName
|
|
256
|
-
document.body.appendChild(pluginDiv)
|
|
257
|
-
|
|
258
|
-
try {
|
|
259
|
-
if ($checkBrowserISIE()) {
|
|
260
|
-
// IE
|
|
261
|
-
pluginDiv.innerHTML =
|
|
262
|
-
'<object id="' + ctlName + '" classid="CLSID:' + CLSID + '" style="HEIGHT:0px; WIDTH:0px"></object>'
|
|
263
|
-
if (addEvent) {
|
|
264
|
-
var clt = eval(ctlName)
|
|
265
|
-
if (clt.attachEvent) {
|
|
266
|
-
clt.attachEvent('OnUsbKeyChange', $OnUsbKeyChange)
|
|
267
|
-
} else {
|
|
268
|
-
// IE11 not support attachEvent, and addEventListener do not work well, so addEvent ourself
|
|
269
|
-
$AttachIE11OnUSBKeychangeEvent(ctlName)
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
} else {
|
|
273
|
-
var chromeVersion = window.navigator.userAgent.match(/Chrome\/(\d+)\./)
|
|
274
|
-
if (chromeVersion && chromeVersion[1]) {
|
|
275
|
-
if (parseInt(chromeVersion[1], 10) >= 42) {
|
|
276
|
-
// not support npapi return false
|
|
277
|
-
document.body.removeChild(pluginDiv)
|
|
278
|
-
pluginDiv.innerHTML = ''
|
|
279
|
-
pluginDiv = null
|
|
280
|
-
return false
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
if (addEvent) {
|
|
285
|
-
pluginDiv.innerHTML =
|
|
286
|
-
'<embed id=' +
|
|
287
|
-
ctlName +
|
|
288
|
-
' type=application/x-xtx-axhost clsid={' +
|
|
289
|
-
CLSID +
|
|
290
|
-
'} event_OnUsbkeyChange=$OnUsbKeyChange width=0 height=0 />'
|
|
291
|
-
} else {
|
|
292
|
-
pluginDiv.innerHTML =
|
|
293
|
-
'<embed id=' + ctlName + ' type=application/x-xtx-axhost clsid={' + CLSID + '} width=0 height=0 />'
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (testFuncName != null && testFuncName != '' && eval(ctlName + '.' + testFuncName) == undefined) {
|
|
298
|
-
document.body.removeChild(pluginDiv)
|
|
299
|
-
pluginDiv.innerHTML = ''
|
|
300
|
-
pluginDiv = null
|
|
301
|
-
return false
|
|
302
|
-
}
|
|
303
|
-
return true
|
|
304
|
-
} catch (e) {
|
|
305
|
-
document.body.removeChild(pluginDiv)
|
|
306
|
-
pluginDiv.innerHTML = ''
|
|
307
|
-
pluginDiv = null
|
|
308
|
-
return false
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
function $XTXAlert(strMsg) {
|
|
313
|
-
if (typeof $_$XTXAlert === 'function') {
|
|
314
|
-
$_$XTXAlert(strMsg)
|
|
315
|
-
} else {
|
|
316
|
-
alert(strMsg)
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
function $myOKRtnFunc(retVal, cb, ctx) {
|
|
321
|
-
if (typeof cb === 'function') {
|
|
322
|
-
var retObj = { retVal: retVal, ctx: ctx }
|
|
323
|
-
cb(retObj)
|
|
324
|
-
}
|
|
325
|
-
return retVal
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
function $myErrorRtnFunc(retVal, cb, ctx) {
|
|
329
|
-
if (typeof cb === 'function') {
|
|
330
|
-
var retObj = { retVal: retVal, ctx: ctx }
|
|
331
|
-
cb(retObj)
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
return retVal
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
function $loginSignRandomCallBack(retObj) {
|
|
338
|
-
if (retObj.retVal == '') {
|
|
339
|
-
$XTXAlert('客户端签名失败!')
|
|
340
|
-
return
|
|
341
|
-
}
|
|
342
|
-
var objForm = retObj.ctx.objForm
|
|
343
|
-
var strAction = retObj.ctx.action
|
|
344
|
-
objForm.UserSignedData.value = retObj.retVal
|
|
345
|
-
objForm.action = strAction
|
|
346
|
-
objForm.submit()
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
function $loginVerifyServerSignatureCallBack(retObj) {
|
|
350
|
-
if (!retObj.retVal) {
|
|
351
|
-
$XTXAlert('验证服务器端信息失败!')
|
|
352
|
-
return
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
var strCertID = retObj.ctx.certID
|
|
356
|
-
SignedData(strCertID, strServerRan, $loginSignRandomCallBack, retObj.ctx)
|
|
357
|
-
}
|
|
358
|
-
function $loginCheckCertValidNotAfter(retObj) {
|
|
359
|
-
var notAfterDate = GetDateNotAfter(retObj.retVal)
|
|
360
|
-
var milliseconds = notAfterDate.getTime() - new Date().getTime()
|
|
361
|
-
if (milliseconds < 0) {
|
|
362
|
-
$XTXAlert('您的证书已过期,请尽快到北京数字证书认证中心办理证书更新手续!')
|
|
363
|
-
return
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
days = parseInt(milliseconds / (1000 * 60 * 60 * 24))
|
|
367
|
-
if (days > 0 && days <= 60) {
|
|
368
|
-
$XTXAlert('您的证书还有' + days + '天过期\n请您尽快到北京数字证书认证中心办理证书更新手续!')
|
|
369
|
-
} else if (days == 0) {
|
|
370
|
-
// 证书有效期天数小于1天
|
|
371
|
-
var hours = parseInt(milliseconds / (1000 * 60 * 60))
|
|
372
|
-
if (hours > 0) {
|
|
373
|
-
$XTXAlert('您的证书还有' + hours + '小时过期\n您尽快到北京数字证书认证中心办理证书更新手续!')
|
|
374
|
-
}
|
|
375
|
-
// 证书有效期小于1小时
|
|
376
|
-
var minutes = parseInt(milliseconds / (1000 * 60))
|
|
377
|
-
if (minutes > 1) {
|
|
378
|
-
$XTXAlert('您的证书还有' + minutes + '分钟过期\n您尽快到北京数字证书认证中心办理证书更新手续!')
|
|
379
|
-
} else {
|
|
380
|
-
$XTXAlert('您的证书已过期,请尽快到北京数字证书认证中心办理证书更新手续!')
|
|
381
|
-
return
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
VerifySignedData(strServerCert, strServerRan, strServerSignedData, $loginVerifyServerSignatureCallBack, retObj.ctx)
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
function $loginCheckCertValidNotBefore(retObj) {
|
|
389
|
-
var notBeforeDate = GetDateNotBefore(retObj.retVal)
|
|
390
|
-
var days = parseInt((notBeforeDate.getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24))
|
|
391
|
-
if (days > 0) {
|
|
392
|
-
$XTXAlert('您的证书尚未生效!距离生效日期还剩' + days + '天!')
|
|
393
|
-
return
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
var strUserCert = retObj.ctx.objForm.UserCert.value
|
|
397
|
-
GetCertBasicinfo(strUserCert, CERT_OID_NOT_AFTER, $loginCheckCertValidNotAfter, retObj.ctx)
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
function $loginGetSignCertCallBack(retObj) {
|
|
401
|
-
var strUserCert = retObj.retVal
|
|
402
|
-
if (strUserCert == '') {
|
|
403
|
-
$XTXAlert('导出用户证书失败!')
|
|
404
|
-
return
|
|
405
|
-
}
|
|
406
|
-
retObj.ctx.objForm.UserCert.value = strUserCert
|
|
407
|
-
|
|
408
|
-
GetCertBasicinfo(strUserCert, CERT_OID_NOT_BEFORE, $loginCheckCertValidNotBefore, retObj.ctx)
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function $loginGetPINRetryCallBack(retObj) {
|
|
412
|
-
var retryCount = Number(retObj.retVal)
|
|
413
|
-
if (retryCount > 0) {
|
|
414
|
-
$XTXAlert('校验证书密码失败!您还有' + retryCount + '次机会重试!')
|
|
415
|
-
return
|
|
416
|
-
} else if (retryCount == 0) {
|
|
417
|
-
$XTXAlert('您的证书密码已被锁死,请联系BJCA进行解锁!')
|
|
418
|
-
return
|
|
419
|
-
} else {
|
|
420
|
-
$XTXAlert('登录失败!')
|
|
421
|
-
return
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
function $loginVerifyPINCallBack(retObj) {
|
|
426
|
-
var strCertID = retObj.ctx.certID
|
|
427
|
-
var objForm = retObj.ctx.objForm
|
|
428
|
-
if (!retObj.retVal) {
|
|
429
|
-
GetUserPINRetryCount(strCertID, $loginGetPINRetryCallBack)
|
|
430
|
-
return
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
objForm.ContainerName.value = strCertID
|
|
434
|
-
|
|
435
|
-
GetSignCert(strCertID, $loginGetSignCertCallBack, retObj.ctx)
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
function Logout(certid, cb, ctx) {
|
|
439
|
-
if ($_$CurrentObj != null && $_$CurrentObj.Logout != undefined) {
|
|
440
|
-
return $_$CurrentObj.Logout(certid, cb, ctx)
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
//Form login
|
|
445
|
-
function Login(formName, strCertID, strPin, strAction) {
|
|
446
|
-
var objForm = eval(formName)
|
|
447
|
-
if (objForm == null) {
|
|
448
|
-
$XTXAlert('表单错误!')
|
|
449
|
-
return
|
|
450
|
-
}
|
|
451
|
-
if (strCertID == null || strCertID == '') {
|
|
452
|
-
$XTXAlert('请输入证书密码!')
|
|
453
|
-
return
|
|
454
|
-
}
|
|
455
|
-
if (strPin == null || strPin == '') {
|
|
456
|
-
$XTXAlert('请输入证书密码!')
|
|
457
|
-
return
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
//Add a hidden item ...
|
|
461
|
-
var strSignItem = '<input type="hidden" name="UserSignedData" value="">'
|
|
462
|
-
if (objForm.UserSignedData == null) {
|
|
463
|
-
objForm.insertAdjacentHTML('BeforeEnd', strSignItem)
|
|
464
|
-
}
|
|
465
|
-
var strCertItem = '<input type="hidden" name="UserCert" value="">'
|
|
466
|
-
if (objForm.UserCert == null) {
|
|
467
|
-
objForm.insertAdjacentHTML('BeforeEnd', strCertItem)
|
|
468
|
-
}
|
|
469
|
-
var strContainerItem = '<input type="hidden" name="ContainerName" value="">'
|
|
470
|
-
if (objForm.ContainerName == null) {
|
|
471
|
-
objForm.insertAdjacentHTML('BeforeEnd', strContainerItem)
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
var ctx = { certID: strCertID, objForm: objForm, action: strAction }
|
|
475
|
-
|
|
476
|
-
VerifyUserPIN(strCertID, strPin, $loginVerifyPINCallBack, ctx)
|
|
477
|
-
|
|
478
|
-
return
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
function GetDeviceType(strCertID, cb, ctx) {
|
|
482
|
-
GetDeviceInfo(strCertID, 7, cb, ctx)
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
//XTXAppCOM class
|
|
486
|
-
function CreateXTXAppObject() {
|
|
487
|
-
var bOK = $LoadControl('3F367B74-92D9-4C5E-AB93-234F8A91D5E6', 'XTXAPP', 'SOF_GetVersion()', true)
|
|
488
|
-
return bOK
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
function CreateGetPicObject() {
|
|
492
|
-
var bOK = $LoadControl('3BC3C868-95B5-47ED-8686-E0E3E94EF366', 'OGetPic', 'GetPic()', false)
|
|
493
|
-
if (!bOK) {
|
|
494
|
-
return null
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
//webSocket client class
|
|
499
|
-
function CreateWebSocketObject(myonopen, myonerror) {
|
|
500
|
-
var o = new Object()
|
|
501
|
-
|
|
502
|
-
o.ws_obj = null
|
|
503
|
-
o.ws_heartbeat_id = 0
|
|
504
|
-
o.ws_queue_id = 0 // call_cmd_id
|
|
505
|
-
o.ws_queue_list = {} // call_cmd_id callback queue
|
|
506
|
-
o.ws_queue_ctx = {}
|
|
507
|
-
o.xtx_version = ''
|
|
508
|
-
|
|
509
|
-
o.load_websocket = function () {
|
|
510
|
-
var ws_url = 'wss://127.0.0.1:21061/xtxapp/'
|
|
511
|
-
ws_url = 'ws://127.0.0.1:21051/xtxapp/'
|
|
512
|
-
try {
|
|
513
|
-
o.ws_obj = new WebSocket(ws_url)
|
|
514
|
-
} catch (e) {
|
|
515
|
-
if (myonerror) {
|
|
516
|
-
myonerror()
|
|
517
|
-
}
|
|
518
|
-
if (console) {
|
|
519
|
-
console.log(e)
|
|
520
|
-
}
|
|
521
|
-
return false
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
o.ws_queue_list['onUsbkeyChange'] = $OnUsbKeyChange
|
|
525
|
-
|
|
526
|
-
o.ws_obj.onopen = function (evt) {
|
|
527
|
-
if (myonopen) {
|
|
528
|
-
myonopen()
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
o.ws_obj.onerror = function (evt) {
|
|
533
|
-
if (myonerror) {
|
|
534
|
-
myonerror()
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
o.ws_obj.onclose = function (evt) {}
|
|
539
|
-
|
|
540
|
-
o.ws_obj.onmessage = function (evt) {
|
|
541
|
-
var res = JSON.parse(evt.data)
|
|
542
|
-
if (res['set-cookie']) {
|
|
543
|
-
document.cookie = res['set-cookie']
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
//登录失败
|
|
547
|
-
if (res['loginError']) {
|
|
548
|
-
alert(res['loginError'])
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
var call_cmd_id = res['call_cmd_id']
|
|
552
|
-
if (!call_cmd_id) {
|
|
553
|
-
return
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
var execFunc = o.ws_queue_list[call_cmd_id]
|
|
557
|
-
if (typeof execFunc !== 'function') {
|
|
558
|
-
return
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
var ctx = o.ws_queue_ctx[res['call_cmd_id']]
|
|
562
|
-
ctx = ctx || { returnType: 'string' }
|
|
563
|
-
|
|
564
|
-
var ret
|
|
565
|
-
if (ctx.returnType == 'bool') {
|
|
566
|
-
ret = res.retVal == 'true'
|
|
567
|
-
} else if (ctx.returnType == 'number') {
|
|
568
|
-
ret = Number(res.retVal)
|
|
569
|
-
} else {
|
|
570
|
-
ret = res.retVal
|
|
571
|
-
}
|
|
572
|
-
var retObj = { retVal: ret, ctx: ctx }
|
|
573
|
-
|
|
574
|
-
execFunc(retObj)
|
|
575
|
-
|
|
576
|
-
if (res['call_cmd_id'] != 'onUsbkeyChange') {
|
|
577
|
-
delete o.ws_queue_list[res['call_cmd_id']]
|
|
578
|
-
}
|
|
579
|
-
delete o.ws_queue_ctx[res['call_cmd_id']]
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
return true
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
o.sendMessage = function (sendMsg) {
|
|
586
|
-
if (o.ws_obj.readyState == WebSocket.OPEN) {
|
|
587
|
-
o.ws_obj.send(JSON.stringify(sendMsg))
|
|
588
|
-
} else {
|
|
589
|
-
setTimeout(function () {
|
|
590
|
-
if (sendMsg.count) {
|
|
591
|
-
sendMsg.count++
|
|
592
|
-
if (sendMsg.count === 4) {
|
|
593
|
-
return
|
|
594
|
-
}
|
|
595
|
-
} else {
|
|
596
|
-
sendMsg.count = 1
|
|
597
|
-
}
|
|
598
|
-
o.sendMessage(sendMsg)
|
|
599
|
-
}, 500)
|
|
600
|
-
console.log("Can't connect to WebSocket server!")
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
o.callMethod = function (strMethodName, cb, ctx, returnType, argsArray) {
|
|
605
|
-
o.ws_queue_id++
|
|
606
|
-
if (typeof cb === 'function') {
|
|
607
|
-
o.ws_queue_list['i_' + o.ws_queue_id] = cb
|
|
608
|
-
ctx = ctx || {}
|
|
609
|
-
ctx.returnType = returnType
|
|
610
|
-
o.ws_queue_ctx['i_' + o.ws_queue_id] = ctx
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
var sendArray = {}
|
|
614
|
-
// sendArray['cookie'] = document.cookie;
|
|
615
|
-
sendArray['xtx_func_name'] = strMethodName
|
|
616
|
-
sendArray['call_cmd_id'] = 'i_' + o.ws_queue_id
|
|
617
|
-
|
|
618
|
-
// if (arguments.length > 4) {
|
|
619
|
-
// sendArray["param"] = argsArray;
|
|
620
|
-
// }
|
|
621
|
-
if (arguments.length > 4) {
|
|
622
|
-
for (var i = 1; i <= argsArray.length; i++) {
|
|
623
|
-
var strParam = 'param_' + i
|
|
624
|
-
sendArray[strParam] = argsArray[i - 1]
|
|
625
|
-
}
|
|
626
|
-
sendArray['param'] = argsArray
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
o.sendMessage(sendArray)
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
if (!o.load_websocket()) {
|
|
633
|
-
return null
|
|
634
|
-
}
|
|
635
|
-
return o
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
//Interface
|
|
639
|
-
var ComInterface = {}
|
|
640
|
-
var PicComInterface = {}
|
|
641
|
-
var WebsocketInterface = {}
|
|
642
|
-
var CurrentInterface = {}
|
|
643
|
-
|
|
644
|
-
//init_Interface
|
|
645
|
-
function init_Interface(func, altename) {
|
|
646
|
-
window[func] = function () {
|
|
647
|
-
if (CurrentInterface[func]) {
|
|
648
|
-
CurrentInterface[func].apply(this, arguments)
|
|
649
|
-
return
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
if (PicComInterface[func]) {
|
|
653
|
-
PicComInterface[func].apply(this, arguments)
|
|
654
|
-
return
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
if (altename) {
|
|
659
|
-
window[altename] = window[func]
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
//初始化
|
|
664
|
-
function init(sunccess, error) {
|
|
665
|
-
CreateGetPicObject()
|
|
666
|
-
var b = CreateXTXAppObject()
|
|
667
|
-
if (b) {
|
|
668
|
-
CurrentInterface = ComInterface
|
|
669
|
-
if (sunccess) {
|
|
670
|
-
sunccess()
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
return
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
WebsocketApp = CreateWebSocketObject(sunccess, error)
|
|
677
|
-
if (WebsocketApp) {
|
|
678
|
-
CurrentInterface = WebsocketInterface
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
//template_gen
|
|
683
|
-
ComInterface.SOF_SetSignMethod = function (SignMethod, cb, ctx) {
|
|
684
|
-
var ret = XTXAPP.SOF_SetSignMethod(SignMethod)
|
|
685
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
WebsocketInterface.SOF_SetSignMethod = function (SignMethod, cb, ctx) {
|
|
689
|
-
var paramArray = [SignMethod]
|
|
690
|
-
WebsocketApp.callMethod('SOF_SetSignMethod', cb, ctx, 'number', paramArray)
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
ComInterface.SOF_GetSignMethod = function (cb, ctx) {
|
|
694
|
-
var ret = XTXAPP.SOF_GetSignMethod()
|
|
695
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
WebsocketInterface.SOF_GetSignMethod = function (cb, ctx) {
|
|
699
|
-
var paramArray = []
|
|
700
|
-
WebsocketApp.callMethod('SOF_GetSignMethod', cb, ctx, 'number', paramArray)
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
ComInterface.SOF_SetEncryptMethod = function (EncryptMethod, cb, ctx) {
|
|
704
|
-
var ret = XTXAPP.SOF_SetEncryptMethod(EncryptMethod)
|
|
705
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
WebsocketInterface.SOF_SetEncryptMethod = function (EncryptMethod, cb, ctx) {
|
|
709
|
-
var paramArray = [EncryptMethod]
|
|
710
|
-
WebsocketApp.callMethod('SOF_SetEncryptMethod', cb, ctx, 'number', paramArray)
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
ComInterface.SOF_GetEncryptMethod = function (cb, ctx) {
|
|
714
|
-
var ret = XTXAPP.SOF_GetEncryptMethod()
|
|
715
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
WebsocketInterface.SOF_GetEncryptMethod = function (cb, ctx) {
|
|
719
|
-
var paramArray = []
|
|
720
|
-
WebsocketApp.callMethod('SOF_GetEncryptMethod', cb, ctx, 'number', paramArray)
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
ComInterface.SOF_GetUserList = function (cb, ctx) {
|
|
724
|
-
var ret = XTXAPP.SOF_GetUserList()
|
|
725
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
WebsocketInterface.SOF_GetUserList = function (cb, ctx) {
|
|
729
|
-
var paramArray = []
|
|
730
|
-
WebsocketApp.callMethod('SOF_GetUserList', cb, ctx, 'string', paramArray)
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
ComInterface.SOF_ExportUserCert = function (CertID, cb, ctx) {
|
|
734
|
-
var ret = XTXAPP.SOF_ExportUserCert(CertID)
|
|
735
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
WebsocketInterface.SOF_ExportUserCert = function (CertID, cb, ctx) {
|
|
739
|
-
var paramArray = [CertID]
|
|
740
|
-
WebsocketApp.callMethod('SOF_ExportUserCert', cb, ctx, 'string', paramArray)
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
ComInterface.SOF_Login = function (CertID, PassWd, cb, ctx) {
|
|
744
|
-
var ret = XTXAPP.SOF_Login(CertID, PassWd)
|
|
745
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
WebsocketInterface.SOF_Login = function (CertID, PassWd, cb, ctx) {
|
|
749
|
-
var paramArray = [CertID, PassWd]
|
|
750
|
-
WebsocketApp.callMethod('SOF_Login', cb, ctx, 'bool', paramArray)
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
ComInterface.SOF_GetPinRetryCount = function (CertID, cb, ctx) {
|
|
754
|
-
var ret = XTXAPP.SOF_GetPinRetryCount(CertID)
|
|
755
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
WebsocketInterface.SOF_GetPinRetryCount = function (CertID, cb, ctx) {
|
|
759
|
-
var paramArray = [CertID]
|
|
760
|
-
WebsocketApp.callMethod('SOF_GetPinRetryCount', cb, ctx, 'number', paramArray)
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
ComInterface.SOF_ChangePassWd = function (CertID, oldPass, newPass, cb, ctx) {
|
|
764
|
-
var ret = XTXAPP.SOF_ChangePassWd(CertID, oldPass, newPass)
|
|
765
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
WebsocketInterface.SOF_ChangePassWd = function (CertID, oldPass, newPass, cb, ctx) {
|
|
769
|
-
var paramArray = [CertID, oldPass, newPass]
|
|
770
|
-
WebsocketApp.callMethod('SOF_ChangePassWd', cb, ctx, 'bool', paramArray)
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
ComInterface.SOF_GetCertInfo = function (Cert, type, cb, ctx) {
|
|
774
|
-
var ret = XTXAPP.SOF_GetCertInfo(Cert, type)
|
|
775
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
WebsocketInterface.SOF_GetCertInfo = function (Cert, type, cb, ctx) {
|
|
779
|
-
var paramArray = [Cert, type]
|
|
780
|
-
WebsocketApp.callMethod('SOF_GetCertInfo', cb, ctx, 'string', paramArray)
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
ComInterface.SOF_GetCertInfoByOid = function (Cert, Oid, cb, ctx) {
|
|
784
|
-
var ret = XTXAPP.SOF_GetCertInfoByOid(Cert, Oid)
|
|
785
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
WebsocketInterface.SOF_GetCertInfoByOid = function (Cert, Oid, cb, ctx) {
|
|
789
|
-
var paramArray = [Cert, Oid]
|
|
790
|
-
WebsocketApp.callMethod('SOF_GetCertInfoByOid', cb, ctx, 'string', paramArray)
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
ComInterface.SOF_SignData = function (CertID, InData, cb, ctx) {
|
|
794
|
-
var ret = XTXAPP.SOF_SignData(CertID, InData)
|
|
795
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
WebsocketInterface.SOF_SignData = function (CertID, InData, cb, ctx) {
|
|
799
|
-
var paramArray = [CertID, InData]
|
|
800
|
-
WebsocketApp.callMethod('SOF_SignData', cb, ctx, 'string', paramArray)
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
ComInterface.SOF_VerifySignedData = function (Cert, InData, SignValue, cb, ctx) {
|
|
804
|
-
var ret = XTXAPP.SOF_VerifySignedData(Cert, InData, SignValue)
|
|
805
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
WebsocketInterface.SOF_VerifySignedData = function (Cert, InData, SignValue, cb, ctx) {
|
|
809
|
-
var paramArray = [Cert, InData, SignValue]
|
|
810
|
-
WebsocketApp.callMethod('SOF_VerifySignedData', cb, ctx, 'bool', paramArray)
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
ComInterface.SOF_SignFile = function (CertID, InFile, cb, ctx) {
|
|
814
|
-
var ret = XTXAPP.SOF_SignFile(CertID, InFile)
|
|
815
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
WebsocketInterface.SOF_SignFile = function (CertID, InFile, cb, ctx) {
|
|
819
|
-
var paramArray = [CertID, InFile]
|
|
820
|
-
WebsocketApp.callMethod('SOF_SignFile', cb, ctx, 'string', paramArray)
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
ComInterface.SOF_VerifySignedFile = function (Cert, InFile, SignValue, cb, ctx) {
|
|
824
|
-
var ret = XTXAPP.SOF_VerifySignedFile(Cert, InFile, SignValue)
|
|
825
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
WebsocketInterface.SOF_VerifySignedFile = function (Cert, InFile, SignValue, cb, ctx) {
|
|
829
|
-
var paramArray = [Cert, InFile, SignValue]
|
|
830
|
-
WebsocketApp.callMethod('SOF_VerifySignedFile', cb, ctx, 'bool', paramArray)
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
ComInterface.SOF_EncryptData = function (Cert, InData, cb, ctx) {
|
|
834
|
-
var ret = XTXAPP.SOF_EncryptData(Cert, InData)
|
|
835
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
WebsocketInterface.SOF_EncryptData = function (Cert, InData, cb, ctx) {
|
|
839
|
-
var paramArray = [Cert, InData]
|
|
840
|
-
WebsocketApp.callMethod('SOF_EncryptData', cb, ctx, 'string', paramArray)
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
ComInterface.SOF_DecryptData = function (CertID, InData, cb, ctx) {
|
|
844
|
-
var ret = XTXAPP.SOF_DecryptData(CertID, InData)
|
|
845
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
WebsocketInterface.SOF_DecryptData = function (CertID, InData, cb, ctx) {
|
|
849
|
-
var paramArray = [CertID, InData]
|
|
850
|
-
WebsocketApp.callMethod('SOF_DecryptData', cb, ctx, 'string', paramArray)
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
ComInterface.SOF_EncryptFile = function (Cert, InFile, OutFile, cb, ctx) {
|
|
854
|
-
var ret = XTXAPP.SOF_EncryptFile(Cert, InFile, OutFile)
|
|
855
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
WebsocketInterface.SOF_EncryptFile = function (Cert, InFile, OutFile, cb, ctx) {
|
|
859
|
-
var paramArray = [Cert, InFile, OutFile]
|
|
860
|
-
WebsocketApp.callMethod('SOF_EncryptFile', cb, ctx, 'bool', paramArray)
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
ComInterface.SOF_DecryptFile = function (CertID, InFile, OutFile, cb, ctx) {
|
|
864
|
-
var ret = XTXAPP.SOF_DecryptFile(CertID, InFile, OutFile)
|
|
865
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
WebsocketInterface.SOF_DecryptFile = function (CertID, InFile, OutFile, cb, ctx) {
|
|
869
|
-
var paramArray = [CertID, InFile, OutFile]
|
|
870
|
-
WebsocketApp.callMethod('SOF_DecryptFile', cb, ctx, 'bool', paramArray)
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
ComInterface.SOF_SignMessage = function (dwFlag, CertID, InData, cb, ctx) {
|
|
874
|
-
var ret = XTXAPP.SOF_SignMessage(dwFlag, CertID, InData)
|
|
875
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
WebsocketInterface.SOF_SignMessage = function (dwFlag, CertID, InData, cb, ctx) {
|
|
879
|
-
var paramArray = [dwFlag, CertID, InData]
|
|
880
|
-
WebsocketApp.callMethod('SOF_SignMessage', cb, ctx, 'string', paramArray)
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
ComInterface.SOF_VerifySignedMessage = function (MessageData, InData, cb, ctx) {
|
|
884
|
-
var ret = XTXAPP.SOF_VerifySignedMessage(MessageData, InData)
|
|
885
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
WebsocketInterface.SOF_VerifySignedMessage = function (MessageData, InData, cb, ctx) {
|
|
889
|
-
var paramArray = [MessageData, InData]
|
|
890
|
-
WebsocketApp.callMethod('SOF_VerifySignedMessage', cb, ctx, 'bool', paramArray)
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
ComInterface.SOF_GetInfoFromSignedMessage = function (SignedMessage, type, cb, ctx) {
|
|
894
|
-
var ret = XTXAPP.SOF_GetInfoFromSignedMessage(SignedMessage, type)
|
|
895
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
WebsocketInterface.SOF_GetInfoFromSignedMessage = function (SignedMessage, type, cb, ctx) {
|
|
899
|
-
var paramArray = [SignedMessage, type]
|
|
900
|
-
WebsocketApp.callMethod('SOF_GetInfoFromSignedMessage', cb, ctx, 'string', paramArray)
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
ComInterface.SOF_SignDataXML = function (CertID, InData, cb, ctx) {
|
|
904
|
-
var ret = XTXAPP.SOF_SignDataXML(CertID, InData)
|
|
905
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
WebsocketInterface.SOF_SignDataXML = function (CertID, InData, cb, ctx) {
|
|
909
|
-
var paramArray = [CertID, InData]
|
|
910
|
-
WebsocketApp.callMethod('SOF_SignDataXML', cb, ctx, 'string', paramArray)
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
ComInterface.SOF_VerifySignedDataXML = function (InData, cb, ctx) {
|
|
914
|
-
var ret = XTXAPP.SOF_VerifySignedDataXML(InData)
|
|
915
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
WebsocketInterface.SOF_VerifySignedDataXML = function (InData, cb, ctx) {
|
|
919
|
-
var paramArray = [InData]
|
|
920
|
-
WebsocketApp.callMethod('SOF_VerifySignedDataXML', cb, ctx, 'bool', paramArray)
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
ComInterface.SOF_GetXMLSignatureInfo = function (XMLSignedData, type, cb, ctx) {
|
|
924
|
-
var ret = XTXAPP.SOF_GetXMLSignatureInfo(XMLSignedData, type)
|
|
925
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
WebsocketInterface.SOF_GetXMLSignatureInfo = function (XMLSignedData, type, cb, ctx) {
|
|
929
|
-
var paramArray = [XMLSignedData, type]
|
|
930
|
-
WebsocketApp.callMethod('SOF_GetXMLSignatureInfo', cb, ctx, 'string', paramArray)
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
ComInterface.SOF_GenRandom = function (RandomLen, cb, ctx) {
|
|
934
|
-
var ret = XTXAPP.SOF_GenRandom(RandomLen)
|
|
935
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
WebsocketInterface.SOF_GenRandom = function (RandomLen, cb, ctx) {
|
|
939
|
-
var paramArray = [RandomLen]
|
|
940
|
-
WebsocketApp.callMethod('SOF_GenRandom', cb, ctx, 'string', paramArray)
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
ComInterface.SOF_PubKeyEncrypt = function (Cert, InData, cb, ctx) {
|
|
944
|
-
var ret = XTXAPP.SOF_PubKeyEncrypt(Cert, InData)
|
|
945
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
WebsocketInterface.SOF_PubKeyEncrypt = function (Cert, InData, cb, ctx) {
|
|
949
|
-
var paramArray = [Cert, InData]
|
|
950
|
-
WebsocketApp.callMethod('SOF_PubKeyEncrypt', cb, ctx, 'string', paramArray)
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
ComInterface.SOF_PriKeyDecrypt = function (CertID, InData, cb, ctx) {
|
|
954
|
-
var ret = XTXAPP.SOF_PriKeyDecrypt(CertID, InData)
|
|
955
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
WebsocketInterface.SOF_PriKeyDecrypt = function (CertID, InData, cb, ctx) {
|
|
959
|
-
var paramArray = [CertID, InData]
|
|
960
|
-
WebsocketApp.callMethod('SOF_PriKeyDecrypt', cb, ctx, 'string', paramArray)
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
ComInterface.SOF_SecertSegment = function (Secert, m, n, k, cb, ctx) {
|
|
964
|
-
var ret = XTXAPP.SOF_SecertSegment(Secert, m, n, k)
|
|
965
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
WebsocketInterface.SOF_SecertSegment = function (Secert, m, n, k, cb, ctx) {
|
|
969
|
-
var paramArray = [Secert, m, n, k]
|
|
970
|
-
WebsocketApp.callMethod('SOF_SecertSegment', cb, ctx, 'string', paramArray)
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
ComInterface.SOF_SecertRecovery = function (Seg, cb, ctx) {
|
|
974
|
-
var ret = XTXAPP.SOF_SecertRecovery(Seg)
|
|
975
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
WebsocketInterface.SOF_SecertRecovery = function (Seg, cb, ctx) {
|
|
979
|
-
var paramArray = [Seg]
|
|
980
|
-
WebsocketApp.callMethod('SOF_SecertRecovery', cb, ctx, 'string', paramArray)
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
ComInterface.SOF_GetLastError = function (cb, ctx) {
|
|
984
|
-
var ret = XTXAPP.SOF_GetLastError()
|
|
985
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
WebsocketInterface.SOF_GetLastError = function (cb, ctx) {
|
|
989
|
-
var paramArray = []
|
|
990
|
-
WebsocketApp.callMethod('SOF_GetLastError', cb, ctx, 'number', paramArray)
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
ComInterface.GetDeviceCount = function (cb, ctx) {
|
|
994
|
-
var ret = XTXAPP.GetDeviceCount()
|
|
995
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
WebsocketInterface.GetDeviceCount = function (cb, ctx) {
|
|
999
|
-
var paramArray = []
|
|
1000
|
-
WebsocketApp.callMethod('GetDeviceCount', cb, ctx, 'number', paramArray)
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
ComInterface.GetAllDeviceSN = function (cb, ctx) {
|
|
1004
|
-
var ret = XTXAPP.GetAllDeviceSN()
|
|
1005
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
WebsocketInterface.GetAllDeviceSN = function (cb, ctx) {
|
|
1009
|
-
var paramArray = []
|
|
1010
|
-
WebsocketApp.callMethod('GetAllDeviceSN', cb, ctx, 'string', paramArray)
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
ComInterface.GetDeviceSNByIndex = function (iIndex, cb, ctx) {
|
|
1014
|
-
var ret = XTXAPP.GetDeviceSNByIndex(iIndex)
|
|
1015
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
WebsocketInterface.GetDeviceSNByIndex = function (iIndex, cb, ctx) {
|
|
1019
|
-
var paramArray = [iIndex]
|
|
1020
|
-
WebsocketApp.callMethod('GetDeviceSNByIndex', cb, ctx, 'string', paramArray)
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
ComInterface.GetDeviceInfo = function (sDeviceSN, iType, cb, ctx) {
|
|
1024
|
-
var ret = XTXAPP.GetDeviceInfo(sDeviceSN, iType)
|
|
1025
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
WebsocketInterface.GetDeviceInfo = function (sDeviceSN, iType, cb, ctx) {
|
|
1029
|
-
var paramArray = [sDeviceSN, iType]
|
|
1030
|
-
WebsocketApp.callMethod('GetDeviceInfo', cb, ctx, 'string', paramArray)
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
ComInterface.ChangeAdminPass = function (sDeviceSN, sOldPass, sNewPass, cb, ctx) {
|
|
1034
|
-
var ret = XTXAPP.ChangeAdminPass(sDeviceSN, sOldPass, sNewPass)
|
|
1035
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
WebsocketInterface.ChangeAdminPass = function (sDeviceSN, sOldPass, sNewPass, cb, ctx) {
|
|
1039
|
-
var paramArray = [sDeviceSN, sOldPass, sNewPass]
|
|
1040
|
-
WebsocketApp.callMethod('ChangeAdminPass', cb, ctx, 'bool', paramArray)
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
ComInterface.UnlockUserPass = function (sDeviceSN, sAdminPass, sNewUserPass, cb, ctx) {
|
|
1044
|
-
var ret = XTXAPP.UnlockUserPass(sDeviceSN, sAdminPass, sNewUserPass)
|
|
1045
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
WebsocketInterface.UnlockUserPass = function (sDeviceSN, sAdminPass, sNewUserPass, cb, ctx) {
|
|
1049
|
-
var paramArray = [sDeviceSN, sAdminPass, sNewUserPass]
|
|
1050
|
-
WebsocketApp.callMethod('UnlockUserPass', cb, ctx, 'bool', paramArray)
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
ComInterface.GenerateKeyPair = function (sDeviceSN, sContainerName, iKeyType, bSign, cb, ctx) {
|
|
1054
|
-
var ret = XTXAPP.GenerateKeyPair(sDeviceSN, sContainerName, iKeyType, bSign)
|
|
1055
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
WebsocketInterface.GenerateKeyPair = function (sDeviceSN, sContainerName, iKeyType, bSign, cb, ctx) {
|
|
1059
|
-
var paramArray = [sDeviceSN, sContainerName, iKeyType, bSign]
|
|
1060
|
-
WebsocketApp.callMethod('GenerateKeyPair', cb, ctx, 'bool', paramArray)
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
ComInterface.ExportPubKey = function (sDeviceSN, sContainerName, bSign, cb, ctx) {
|
|
1064
|
-
var ret = XTXAPP.ExportPubKey(sDeviceSN, sContainerName, bSign)
|
|
1065
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
WebsocketInterface.ExportPubKey = function (sDeviceSN, sContainerName, bSign, cb, ctx) {
|
|
1069
|
-
var paramArray = [sDeviceSN, sContainerName, bSign]
|
|
1070
|
-
WebsocketApp.callMethod('ExportPubKey', cb, ctx, 'string', paramArray)
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
ComInterface.ImportSignCert = function (sDeviceSN, sContainerName, sCert, cb, ctx) {
|
|
1074
|
-
var ret = XTXAPP.ImportSignCert(sDeviceSN, sContainerName, sCert)
|
|
1075
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
WebsocketInterface.ImportSignCert = function (sDeviceSN, sContainerName, sCert, cb, ctx) {
|
|
1079
|
-
var paramArray = [sDeviceSN, sContainerName, sCert]
|
|
1080
|
-
WebsocketApp.callMethod('ImportSignCert', cb, ctx, 'bool', paramArray)
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
ComInterface.ImportEncCert = function (sDeviceSN, sContainerName, sCert, sPriKeyCipher, cb, ctx) {
|
|
1084
|
-
var ret = XTXAPP.ImportEncCert(sDeviceSN, sContainerName, sCert, sPriKeyCipher)
|
|
1085
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
WebsocketInterface.ImportEncCert = function (sDeviceSN, sContainerName, sCert, sPriKeyCipher, cb, ctx) {
|
|
1089
|
-
var paramArray = [sDeviceSN, sContainerName, sCert, sPriKeyCipher]
|
|
1090
|
-
WebsocketApp.callMethod('ImportEncCert', cb, ctx, 'bool', paramArray)
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
ComInterface.ReadFile = function (sDeviceSN, sFileName, cb, ctx) {
|
|
1094
|
-
var ret = XTXAPP.ReadFile(sDeviceSN, sFileName)
|
|
1095
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
WebsocketInterface.ReadFile = function (sDeviceSN, sFileName, cb, ctx) {
|
|
1099
|
-
var paramArray = [sDeviceSN, sFileName]
|
|
1100
|
-
WebsocketApp.callMethod('ReadFile', cb, ctx, 'string', paramArray)
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
ComInterface.WriteFile = function (sDeviceSN, sFileName, sContent, bPrivate, cb, ctx) {
|
|
1104
|
-
var ret = XTXAPP.WriteFile(sDeviceSN, sFileName, sContent, bPrivate)
|
|
1105
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
WebsocketInterface.WriteFile = function (sDeviceSN, sFileName, sContent, bPrivate, cb, ctx) {
|
|
1109
|
-
var paramArray = [sDeviceSN, sFileName, sContent, bPrivate]
|
|
1110
|
-
WebsocketApp.callMethod('WriteFile', cb, ctx, 'bool', paramArray)
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
ComInterface.IsContainerExist = function (sDeviceSN, sContainerName, cb, ctx) {
|
|
1114
|
-
var ret = XTXAPP.IsContainerExist(sDeviceSN, sContainerName)
|
|
1115
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
WebsocketInterface.IsContainerExist = function (sDeviceSN, sContainerName, cb, ctx) {
|
|
1119
|
-
var paramArray = [sDeviceSN, sContainerName]
|
|
1120
|
-
WebsocketApp.callMethod('IsContainerExist', cb, ctx, 'bool', paramArray)
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
ComInterface.DeleteContainer = function (sDeviceSN, sContainerName, cb, ctx) {
|
|
1124
|
-
var ret = XTXAPP.DeleteContainer(sDeviceSN, sContainerName)
|
|
1125
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
WebsocketInterface.DeleteContainer = function (sDeviceSN, sContainerName, cb, ctx) {
|
|
1129
|
-
var paramArray = [sDeviceSN, sContainerName]
|
|
1130
|
-
WebsocketApp.callMethod('DeleteContainer', cb, ctx, 'bool', paramArray)
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
ComInterface.ExportPKCS10 = function (sDeviceSN, sContainerName, sDN, bSign, cb, ctx) {
|
|
1134
|
-
var ret = XTXAPP.ExportPKCS10(sDeviceSN, sContainerName, sDN, bSign)
|
|
1135
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
WebsocketInterface.ExportPKCS10 = function (sDeviceSN, sContainerName, sDN, bSign, cb, ctx) {
|
|
1139
|
-
var paramArray = [sDeviceSN, sContainerName, sDN, bSign]
|
|
1140
|
-
WebsocketApp.callMethod('ExportPKCS10', cb, ctx, 'string', paramArray)
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
ComInterface.InitDevice = function (sDeviceSN, sAdminPass, cb, ctx) {
|
|
1144
|
-
var ret = XTXAPP.InitDevice(sDeviceSN, sAdminPass)
|
|
1145
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
WebsocketInterface.InitDevice = function (sDeviceSN, sAdminPass, cb, ctx) {
|
|
1149
|
-
var paramArray = [sDeviceSN, sAdminPass]
|
|
1150
|
-
WebsocketApp.callMethod('InitDevice', cb, ctx, 'bool', paramArray)
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
ComInterface.CertListFormElement = function (cb, ctx) {
|
|
1154
|
-
var ret = XTXAPP.CertListFormElement()
|
|
1155
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
WebsocketInterface.CertListFormElement = function (cb, ctx) {
|
|
1159
|
-
var paramArray = []
|
|
1160
|
-
WebsocketApp.callMethod('CertListFormElement', cb, ctx, 'string', paramArray)
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
ComInterface.CertListFormElement = function (newVal, cb, ctx) {
|
|
1164
|
-
var ret = XTXAPP.CertListFormElement(newVal)
|
|
1165
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
WebsocketInterface.CertListFormElement = function (newVal, cb, ctx) {
|
|
1169
|
-
var paramArray = [newVal]
|
|
1170
|
-
WebsocketApp.callMethod('CertListFormElement', cb, ctx, 'string', paramArray)
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
ComInterface.AlertBeforeCertDate = function (cb, ctx) {
|
|
1174
|
-
var ret = XTXAPP.AlertBeforeCertDate()
|
|
1175
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
WebsocketInterface.AlertBeforeCertDate = function (cb, ctx) {
|
|
1179
|
-
var paramArray = []
|
|
1180
|
-
WebsocketApp.callMethod('AlertBeforeCertDate', cb, ctx, 'string', paramArray)
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
ComInterface.AlertBeforeCertDate = function (newVal, cb, ctx) {
|
|
1184
|
-
var ret = XTXAPP.AlertBeforeCertDate(newVal)
|
|
1185
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
WebsocketInterface.AlertBeforeCertDate = function (newVal, cb, ctx) {
|
|
1189
|
-
var paramArray = [newVal]
|
|
1190
|
-
WebsocketApp.callMethod('AlertBeforeCertDate', cb, ctx, 'string', paramArray)
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
ComInterface.ServerSignedData = function (cb, ctx) {
|
|
1194
|
-
var ret = XTXAPP.ServerSignedData()
|
|
1195
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
WebsocketInterface.ServerSignedData = function (cb, ctx) {
|
|
1199
|
-
var paramArray = []
|
|
1200
|
-
WebsocketApp.callMethod('ServerSignedData', cb, ctx, 'string', paramArray)
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
ComInterface.ServerSignedData = function (newVal, cb, ctx) {
|
|
1204
|
-
var ret = XTXAPP.ServerSignedData(newVal)
|
|
1205
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
WebsocketInterface.ServerSignedData = function (newVal, cb, ctx) {
|
|
1209
|
-
var paramArray = [newVal]
|
|
1210
|
-
WebsocketApp.callMethod('ServerSignedData', cb, ctx, 'string', paramArray)
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
ComInterface.ServerRan = function (cb, ctx) {
|
|
1214
|
-
var ret = XTXAPP.ServerRan()
|
|
1215
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
WebsocketInterface.ServerRan = function (cb, ctx) {
|
|
1219
|
-
var paramArray = []
|
|
1220
|
-
WebsocketApp.callMethod('ServerRan', cb, ctx, 'string', paramArray)
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
ComInterface.ServerRan = function (newVal, cb, ctx) {
|
|
1224
|
-
var ret = XTXAPP.ServerRan(newVal)
|
|
1225
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
WebsocketInterface.ServerRan = function (newVal, cb, ctx) {
|
|
1229
|
-
var paramArray = [newVal]
|
|
1230
|
-
WebsocketApp.callMethod('ServerRan', cb, ctx, 'string', paramArray)
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
ComInterface.ServerCert = function (cb, ctx) {
|
|
1234
|
-
var ret = XTXAPP.ServerCert()
|
|
1235
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
WebsocketInterface.ServerCert = function (cb, ctx) {
|
|
1239
|
-
var paramArray = []
|
|
1240
|
-
WebsocketApp.callMethod('ServerCert', cb, ctx, 'string', paramArray)
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
ComInterface.ServerCert = function (newVal, cb, ctx) {
|
|
1244
|
-
var ret = XTXAPP.ServerCert(newVal)
|
|
1245
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
WebsocketInterface.ServerCert = function (newVal, cb, ctx) {
|
|
1249
|
-
var paramArray = [newVal]
|
|
1250
|
-
WebsocketApp.callMethod('ServerCert', cb, ctx, 'string', paramArray)
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
ComInterface.ServerMode = function (cb, ctx) {
|
|
1254
|
-
var ret = XTXAPP.ServerMode()
|
|
1255
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
WebsocketInterface.ServerMode = function (cb, ctx) {
|
|
1259
|
-
var paramArray = []
|
|
1260
|
-
WebsocketApp.callMethod('ServerMode', cb, ctx, 'string', paramArray)
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
ComInterface.ServerMode = function (newVal, cb, ctx) {
|
|
1264
|
-
var ret = XTXAPP.ServerMode(newVal)
|
|
1265
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
WebsocketInterface.ServerMode = function (newVal, cb, ctx) {
|
|
1269
|
-
var paramArray = [newVal]
|
|
1270
|
-
WebsocketApp.callMethod('ServerMode', cb, ctx, 'string', paramArray)
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
ComInterface.ShowError = function (cb, ctx) {
|
|
1274
|
-
var ret = XTXAPP.ShowError()
|
|
1275
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
WebsocketInterface.ShowError = function (cb, ctx) {
|
|
1279
|
-
var paramArray = []
|
|
1280
|
-
WebsocketApp.callMethod('ShowError', cb, ctx, 'string', paramArray)
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
ComInterface.ShowError = function (newVal, cb, ctx) {
|
|
1284
|
-
var ret = XTXAPP.ShowError(newVal)
|
|
1285
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
WebsocketInterface.ShowError = function (newVal, cb, ctx) {
|
|
1289
|
-
var paramArray = [newVal]
|
|
1290
|
-
WebsocketApp.callMethod('ShowError', cb, ctx, 'string', paramArray)
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
ComInterface.AddSignInfo = function (sUserPass, cb, ctx) {
|
|
1294
|
-
var ret = XTXAPP.AddSignInfo(sUserPass)
|
|
1295
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
WebsocketInterface.AddSignInfo = function (sUserPass, cb, ctx) {
|
|
1299
|
-
var paramArray = [sUserPass]
|
|
1300
|
-
WebsocketApp.callMethod('AddSignInfo', cb, ctx, 'bool', paramArray)
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
ComInterface.SOF_GetVersion = function (cb, ctx) {
|
|
1304
|
-
var ret = XTXAPP.SOF_GetVersion()
|
|
1305
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
WebsocketInterface.SOF_GetVersion = function (cb, ctx) {
|
|
1309
|
-
var paramArray = []
|
|
1310
|
-
WebsocketApp.callMethod('SOF_GetVersion', cb, ctx, 'string', paramArray)
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
ComInterface.SOF_ExportExChangeUserCert = function (CertID, cb, ctx) {
|
|
1314
|
-
var ret = XTXAPP.SOF_ExportExChangeUserCert(CertID)
|
|
1315
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
WebsocketInterface.SOF_ExportExChangeUserCert = function (CertID, cb, ctx) {
|
|
1319
|
-
var paramArray = [CertID]
|
|
1320
|
-
WebsocketApp.callMethod('SOF_ExportExChangeUserCert', cb, ctx, 'string', paramArray)
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
ComInterface.SOF_ValidateCert = function (Cert, cb, ctx) {
|
|
1324
|
-
var ret = XTXAPP.SOF_ValidateCert(Cert)
|
|
1325
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
WebsocketInterface.SOF_ValidateCert = function (Cert, cb, ctx) {
|
|
1329
|
-
var paramArray = [Cert]
|
|
1330
|
-
WebsocketApp.callMethod('SOF_ValidateCert', cb, ctx, 'number', paramArray)
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
ComInterface.GetENVSN = function (sDeviceSN, cb, ctx) {
|
|
1334
|
-
var ret = XTXAPP.GetENVSN(sDeviceSN)
|
|
1335
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
WebsocketInterface.GetENVSN = function (sDeviceSN, cb, ctx) {
|
|
1339
|
-
var paramArray = [sDeviceSN]
|
|
1340
|
-
WebsocketApp.callMethod('GetENVSN', cb, ctx, 'string', paramArray)
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
ComInterface.SetENVSN = function (sDeviceSN, sEnvsn, cb, ctx) {
|
|
1344
|
-
var ret = XTXAPP.SetENVSN(sDeviceSN, sEnvsn)
|
|
1345
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
WebsocketInterface.SetENVSN = function (sDeviceSN, sEnvsn, cb, ctx) {
|
|
1349
|
-
var paramArray = [sDeviceSN, sEnvsn]
|
|
1350
|
-
WebsocketApp.callMethod('SetENVSN', cb, ctx, 'bool', paramArray)
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
ComInterface.IsDeviceExist = function (sDeviceSN, cb, ctx) {
|
|
1354
|
-
var ret = XTXAPP.IsDeviceExist(sDeviceSN)
|
|
1355
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
WebsocketInterface.IsDeviceExist = function (sDeviceSN, cb, ctx) {
|
|
1359
|
-
var paramArray = [sDeviceSN]
|
|
1360
|
-
WebsocketApp.callMethod('IsDeviceExist', cb, ctx, 'bool', paramArray)
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
ComInterface.GetContainerCount = function (sDeviceSN, cb, ctx) {
|
|
1364
|
-
var ret = XTXAPP.GetContainerCount(sDeviceSN)
|
|
1365
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
WebsocketInterface.GetContainerCount = function (sDeviceSN, cb, ctx) {
|
|
1369
|
-
var paramArray = [sDeviceSN]
|
|
1370
|
-
WebsocketApp.callMethod('GetContainerCount', cb, ctx, 'number', paramArray)
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
ComInterface.SOF_SymEncryptData = function (sKey, indata, cb, ctx) {
|
|
1374
|
-
var ret = XTXAPP.SOF_SymEncryptData(sKey, indata)
|
|
1375
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
WebsocketInterface.SOF_SymEncryptData = function (sKey, indata, cb, ctx) {
|
|
1379
|
-
var paramArray = [sKey, indata]
|
|
1380
|
-
WebsocketApp.callMethod('SOF_SymEncryptData', cb, ctx, 'string', paramArray)
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
ComInterface.SOF_SymDecryptData = function (sKey, indata, cb, ctx) {
|
|
1384
|
-
var ret = XTXAPP.SOF_SymDecryptData(sKey, indata)
|
|
1385
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
WebsocketInterface.SOF_SymDecryptData = function (sKey, indata, cb, ctx) {
|
|
1389
|
-
var paramArray = [sKey, indata]
|
|
1390
|
-
WebsocketApp.callMethod('SOF_SymDecryptData', cb, ctx, 'string', paramArray)
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
ComInterface.SOF_SymEncryptFile = function (sKey, inFile, outFile, cb, ctx) {
|
|
1394
|
-
var ret = XTXAPP.SOF_SymEncryptFile(sKey, inFile, outFile)
|
|
1395
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
WebsocketInterface.SOF_SymEncryptFile = function (sKey, inFile, outFile, cb, ctx) {
|
|
1399
|
-
var paramArray = [sKey, inFile, outFile]
|
|
1400
|
-
WebsocketApp.callMethod('SOF_SymEncryptFile', cb, ctx, 'bool', paramArray)
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
ComInterface.SOF_SymDecryptFile = function (sKey, inFile, outFile, cb, ctx) {
|
|
1404
|
-
var ret = XTXAPP.SOF_SymDecryptFile(sKey, inFile, outFile)
|
|
1405
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
WebsocketInterface.SOF_SymDecryptFile = function (sKey, inFile, outFile, cb, ctx) {
|
|
1409
|
-
var paramArray = [sKey, inFile, outFile]
|
|
1410
|
-
WebsocketApp.callMethod('SOF_SymDecryptFile', cb, ctx, 'bool', paramArray)
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
ComInterface.SOF_GetLastErrMsg = function (cb, ctx) {
|
|
1414
|
-
var ret = XTXAPP.SOF_GetLastErrMsg()
|
|
1415
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
WebsocketInterface.SOF_GetLastErrMsg = function (cb, ctx) {
|
|
1419
|
-
var paramArray = []
|
|
1420
|
-
WebsocketApp.callMethod('SOF_GetLastErrMsg', cb, ctx, 'string', paramArray)
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
ComInterface.SOF_Base64Encode = function (sIndata, cb, ctx) {
|
|
1424
|
-
var ret = XTXAPP.SOF_Base64Encode(sIndata)
|
|
1425
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
WebsocketInterface.SOF_Base64Encode = function (sIndata, cb, ctx) {
|
|
1429
|
-
var paramArray = [sIndata]
|
|
1430
|
-
WebsocketApp.callMethod('SOF_Base64Encode', cb, ctx, 'string', paramArray)
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
ComInterface.SOF_Base64Decode = function (sIndata, cb, ctx) {
|
|
1434
|
-
var ret = XTXAPP.SOF_Base64Decode(sIndata)
|
|
1435
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
WebsocketInterface.SOF_Base64Decode = function (sIndata, cb, ctx) {
|
|
1439
|
-
var paramArray = [sIndata]
|
|
1440
|
-
WebsocketApp.callMethod('SOF_Base64Decode', cb, ctx, 'string', paramArray)
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
ComInterface.SOF_HashData = function (hashAlg, sInData, cb, ctx) {
|
|
1444
|
-
var ret = XTXAPP.SOF_HashData(hashAlg, sInData)
|
|
1445
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
WebsocketInterface.SOF_HashData = function (hashAlg, sInData, cb, ctx) {
|
|
1449
|
-
var paramArray = [hashAlg, sInData]
|
|
1450
|
-
WebsocketApp.callMethod('SOF_HashData', cb, ctx, 'string', paramArray)
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
ComInterface.SOF_HashFile = function (hashAlg, inFile, cb, ctx) {
|
|
1454
|
-
var ret = XTXAPP.SOF_HashFile(hashAlg, inFile)
|
|
1455
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
WebsocketInterface.SOF_HashFile = function (hashAlg, inFile, cb, ctx) {
|
|
1459
|
-
var paramArray = [hashAlg, inFile]
|
|
1460
|
-
WebsocketApp.callMethod('SOF_HashFile', cb, ctx, 'string', paramArray)
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
ComInterface.UnlockUserPassEx = function (sDeviceSN, sAdminPin, sNewUserPass, cb, ctx) {
|
|
1464
|
-
var ret = XTXAPP.UnlockUserPassEx(sDeviceSN, sAdminPin, sNewUserPass)
|
|
1465
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
WebsocketInterface.UnlockUserPassEx = function (sDeviceSN, sAdminPin, sNewUserPass, cb, ctx) {
|
|
1469
|
-
var paramArray = [sDeviceSN, sAdminPin, sNewUserPass]
|
|
1470
|
-
WebsocketApp.callMethod('UnlockUserPassEx', cb, ctx, 'bool', paramArray)
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
ComInterface.DeleteOldContainer = function (sDeviceSN, cb, ctx) {
|
|
1474
|
-
var ret = XTXAPP.DeleteOldContainer(sDeviceSN)
|
|
1475
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
WebsocketInterface.DeleteOldContainer = function (sDeviceSN, cb, ctx) {
|
|
1479
|
-
var paramArray = [sDeviceSN]
|
|
1480
|
-
WebsocketApp.callMethod('DeleteOldContainer', cb, ctx, 'bool', paramArray)
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
ComInterface.WriteFileEx = function (sDeviceSN, sFileName, sContent, cb, ctx) {
|
|
1484
|
-
var ret = XTXAPP.WriteFileEx(sDeviceSN, sFileName, sContent)
|
|
1485
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
WebsocketInterface.WriteFileEx = function (sDeviceSN, sFileName, sContent, cb, ctx) {
|
|
1489
|
-
var paramArray = [sDeviceSN, sFileName, sContent]
|
|
1490
|
-
WebsocketApp.callMethod('WriteFileEx', cb, ctx, 'bool', paramArray)
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
ComInterface.ReadFileEx = function (sDeviceSN, sFileName, cb, ctx) {
|
|
1494
|
-
var ret = XTXAPP.ReadFileEx(sDeviceSN, sFileName)
|
|
1495
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
WebsocketInterface.ReadFileEx = function (sDeviceSN, sFileName, cb, ctx) {
|
|
1499
|
-
var paramArray = [sDeviceSN, sFileName]
|
|
1500
|
-
WebsocketApp.callMethod('ReadFileEx', cb, ctx, 'string', paramArray)
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
ComInterface.SOF_EncryptDataEx = function (Cert, InData, cb, ctx) {
|
|
1504
|
-
var ret = XTXAPP.SOF_EncryptDataEx(Cert, InData)
|
|
1505
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
WebsocketInterface.SOF_EncryptDataEx = function (Cert, InData, cb, ctx) {
|
|
1509
|
-
var paramArray = [Cert, InData]
|
|
1510
|
-
WebsocketApp.callMethod('SOF_EncryptDataEx', cb, ctx, 'string', paramArray)
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
ComInterface.Base64EncodeFile = function (sInFile, cb, ctx) {
|
|
1514
|
-
var ret = XTXAPP.Base64EncodeFile(sInFile)
|
|
1515
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
|
-
WebsocketInterface.Base64EncodeFile = function (sInFile, cb, ctx) {
|
|
1519
|
-
var paramArray = [sInFile]
|
|
1520
|
-
WebsocketApp.callMethod('Base64EncodeFile', cb, ctx, 'string', paramArray)
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
ComInterface.SOF_GetRetryCount = function (CertID, cb, ctx) {
|
|
1524
|
-
var ret = XTXAPP.SOF_GetRetryCount(CertID)
|
|
1525
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
WebsocketInterface.SOF_GetRetryCount = function (CertID, cb, ctx) {
|
|
1529
|
-
var paramArray = [CertID]
|
|
1530
|
-
WebsocketApp.callMethod('SOF_GetRetryCount', cb, ctx, 'number', paramArray)
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
ComInterface.SOF_GetAllContainerName = function (sDeviceSN, cb, ctx) {
|
|
1534
|
-
var ret = XTXAPP.SOF_GetAllContainerName(sDeviceSN)
|
|
1535
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
WebsocketInterface.SOF_GetAllContainerName = function (sDeviceSN, cb, ctx) {
|
|
1539
|
-
var paramArray = [sDeviceSN]
|
|
1540
|
-
WebsocketApp.callMethod('SOF_GetAllContainerName', cb, ctx, 'string', paramArray)
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
ComInterface.CreateSoftDevice = function (sDeviceSN, sLabel, cb, ctx) {
|
|
1544
|
-
var ret = XTXAPP.CreateSoftDevice(sDeviceSN, sLabel)
|
|
1545
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
WebsocketInterface.CreateSoftDevice = function (sDeviceSN, sLabel, cb, ctx) {
|
|
1549
|
-
var paramArray = [sDeviceSN, sLabel]
|
|
1550
|
-
WebsocketApp.callMethod('CreateSoftDevice', cb, ctx, 'bool', paramArray)
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
ComInterface.DeleteSoftDevice = function (sDeviceSN, sPasswd, cb, ctx) {
|
|
1554
|
-
var ret = XTXAPP.DeleteSoftDevice(sDeviceSN, sPasswd)
|
|
1555
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
WebsocketInterface.DeleteSoftDevice = function (sDeviceSN, sPasswd, cb, ctx) {
|
|
1559
|
-
var paramArray = [sDeviceSN, sPasswd]
|
|
1560
|
-
WebsocketApp.callMethod('DeleteSoftDevice', cb, ctx, 'bool', paramArray)
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
ComInterface.EnableSoftDevice = function (enable, sDeviceSN, cb, ctx) {
|
|
1564
|
-
var ret = XTXAPP.EnableSoftDevice(enable, sDeviceSN)
|
|
1565
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
WebsocketInterface.EnableSoftDevice = function (enable, sDeviceSN, cb, ctx) {
|
|
1569
|
-
var paramArray = [enable, sDeviceSN]
|
|
1570
|
-
WebsocketApp.callMethod('EnableSoftDevice', cb, ctx, 'bool', paramArray)
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
ComInterface.SoftDeviceBackup = function (sDeviceSN, sPasswd, cb, ctx) {
|
|
1574
|
-
var ret = XTXAPP.SoftDeviceBackup(sDeviceSN, sPasswd)
|
|
1575
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
WebsocketInterface.SoftDeviceBackup = function (sDeviceSN, sPasswd, cb, ctx) {
|
|
1579
|
-
var paramArray = [sDeviceSN, sPasswd]
|
|
1580
|
-
WebsocketApp.callMethod('SoftDeviceBackup', cb, ctx, 'string', paramArray)
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
ComInterface.SoftDeviceRestore = function (sDeviceSN, sPasswd, sInFilePath, cb, ctx) {
|
|
1584
|
-
var ret = XTXAPP.SoftDeviceRestore(sDeviceSN, sPasswd, sInFilePath)
|
|
1585
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
WebsocketInterface.SoftDeviceRestore = function (sDeviceSN, sPasswd, sInFilePath, cb, ctx) {
|
|
1589
|
-
var paramArray = [sDeviceSN, sPasswd, sInFilePath]
|
|
1590
|
-
WebsocketApp.callMethod('SoftDeviceRestore', cb, ctx, 'bool', paramArray)
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
ComInterface.SOF_Logout = function (CertID, cb, ctx) {
|
|
1594
|
-
var ret = XTXAPP.SOF_Logout(CertID)
|
|
1595
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
WebsocketInterface.SOF_Logout = function (CertID, cb, ctx) {
|
|
1599
|
-
var paramArray = [CertID]
|
|
1600
|
-
WebsocketApp.callMethod('SOF_Logout', cb, ctx, 'bool', paramArray)
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
ComInterface.SetUserConfig = function (type, strConfig, cb, ctx) {
|
|
1604
|
-
var ret = XTXAPP.SetUserConfig(type, strConfig)
|
|
1605
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
WebsocketInterface.SetUserConfig = function (type, strConfig, cb, ctx) {
|
|
1609
|
-
var paramArray = [type, strConfig]
|
|
1610
|
-
WebsocketApp.callMethod('SetUserConfig', cb, ctx, 'bool', paramArray)
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
ComInterface.SOF_SignByteData = function (CertID, byteLen, cb, ctx) {
|
|
1614
|
-
var ret = XTXAPP.SOF_SignByteData(CertID, byteLen)
|
|
1615
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
WebsocketInterface.SOF_SignByteData = function (CertID, byteLen, cb, ctx) {
|
|
1619
|
-
var paramArray = [CertID, byteLen]
|
|
1620
|
-
WebsocketApp.callMethod('SOF_SignByteData', cb, ctx, 'string', paramArray)
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
ComInterface.SOF_VerifySignedByteData = function (Cert, byteLen, SignValue, cb, ctx) {
|
|
1624
|
-
var ret = XTXAPP.SOF_VerifySignedByteData(Cert, byteLen, SignValue)
|
|
1625
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
WebsocketInterface.SOF_VerifySignedByteData = function (Cert, byteLen, SignValue, cb, ctx) {
|
|
1629
|
-
var paramArray = [Cert, byteLen, SignValue]
|
|
1630
|
-
WebsocketApp.callMethod('SOF_VerifySignedByteData', cb, ctx, 'bool', paramArray)
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
ComInterface.OTP_GetChallengeCode = function (sCertID, cb, ctx) {
|
|
1634
|
-
var ret = XTXAPP.OTP_GetChallengeCode(sCertID)
|
|
1635
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
WebsocketInterface.OTP_GetChallengeCode = function (sCertID, cb, ctx) {
|
|
1639
|
-
var paramArray = [sCertID]
|
|
1640
|
-
WebsocketApp.callMethod('OTP_GetChallengeCode', cb, ctx, 'string', paramArray)
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
ComInterface.ImportEncCertEx = function (sDeviceSN, sContainerName, sCert, sPriKeyCipher, ulSymAlg, cb, ctx) {
|
|
1644
|
-
var ret = XTXAPP.ImportEncCertEx(sDeviceSN, sContainerName, sCert, sPriKeyCipher, ulSymAlg)
|
|
1645
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
WebsocketInterface.ImportEncCertEx = function (sDeviceSN, sContainerName, sCert, sPriKeyCipher, ulSymAlg, cb, ctx) {
|
|
1649
|
-
var paramArray = [sDeviceSN, sContainerName, sCert, sPriKeyCipher, ulSymAlg]
|
|
1650
|
-
WebsocketApp.callMethod('ImportEncCertEx', cb, ctx, 'bool', paramArray)
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
ComInterface.SOF_GetCertEntity = function (sCert, cb, ctx) {
|
|
1654
|
-
var ret = XTXAPP.SOF_GetCertEntity(sCert)
|
|
1655
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
WebsocketInterface.SOF_GetCertEntity = function (sCert, cb, ctx) {
|
|
1659
|
-
var paramArray = [sCert]
|
|
1660
|
-
WebsocketApp.callMethod('SOF_GetCertEntity', cb, ctx, 'string', paramArray)
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
ComInterface.SOF_HMAC = function (hashid, key, indata, cb, ctx) {
|
|
1664
|
-
var ret = XTXAPP.SOF_HMAC(hashid, key, indata)
|
|
1665
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
WebsocketInterface.SOF_HMAC = function (hashid, key, indata, cb, ctx) {
|
|
1669
|
-
var paramArray = [hashid, key, indata]
|
|
1670
|
-
WebsocketApp.callMethod('SOF_HMAC', cb, ctx, 'string', paramArray)
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
ComInterface.SOF_SignDataByPriKey = function (sPriKey, sCert, sInData, cb, ctx) {
|
|
1674
|
-
var ret = XTXAPP.SOF_SignDataByPriKey(sPriKey, sCert, sInData)
|
|
1675
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
WebsocketInterface.SOF_SignDataByPriKey = function (sPriKey, sCert, sInData, cb, ctx) {
|
|
1679
|
-
var paramArray = [sPriKey, sCert, sInData]
|
|
1680
|
-
WebsocketApp.callMethod('SOF_SignDataByPriKey', cb, ctx, 'string', paramArray)
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
ComInterface.ImportKeyCertToSoftDevice = function (sDeviceSN, sContainerName, sPriKey, sCert, bSign, cb, ctx) {
|
|
1684
|
-
var ret = XTXAPP.ImportKeyCertToSoftDevice(sDeviceSN, sContainerName, sPriKey, sCert, bSign)
|
|
1685
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
WebsocketInterface.ImportKeyCertToSoftDevice = function (sDeviceSN, sContainerName, sPriKey, sCert, bSign, cb, ctx) {
|
|
1689
|
-
var paramArray = [sDeviceSN, sContainerName, sPriKey, sCert, bSign]
|
|
1690
|
-
WebsocketApp.callMethod('ImportKeyCertToSoftDevice', cb, ctx, 'bool', paramArray)
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
ComInterface.InitDeviceEx = function (
|
|
1694
|
-
sDeviceSN,
|
|
1695
|
-
sAdminPass,
|
|
1696
|
-
sUserPin,
|
|
1697
|
-
sKeyLabel,
|
|
1698
|
-
adminPinMaxRetry,
|
|
1699
|
-
userPinMaxRetry,
|
|
1700
|
-
cb,
|
|
1701
|
-
ctx
|
|
1702
|
-
) {
|
|
1703
|
-
var ret = XTXAPP.InitDeviceEx(sDeviceSN, sAdminPass, sUserPin, sKeyLabel, adminPinMaxRetry, userPinMaxRetry)
|
|
1704
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
WebsocketInterface.InitDeviceEx = function (
|
|
1708
|
-
sDeviceSN,
|
|
1709
|
-
sAdminPass,
|
|
1710
|
-
sUserPin,
|
|
1711
|
-
sKeyLabel,
|
|
1712
|
-
adminPinMaxRetry,
|
|
1713
|
-
userPinMaxRetry,
|
|
1714
|
-
cb,
|
|
1715
|
-
ctx
|
|
1716
|
-
) {
|
|
1717
|
-
var paramArray = [sDeviceSN, sAdminPass, sUserPin, sKeyLabel, adminPinMaxRetry, userPinMaxRetry]
|
|
1718
|
-
WebsocketApp.callMethod('InitDeviceEx', cb, ctx, 'bool', paramArray)
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
ComInterface.SelectFile = function (cb, ctx) {
|
|
1722
|
-
var ret = XTXAPP.SelectFile()
|
|
1723
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
WebsocketInterface.SelectFile = function (cb, ctx) {
|
|
1727
|
-
var paramArray = []
|
|
1728
|
-
WebsocketApp.callMethod('SelectFile', cb, ctx, 'string', paramArray)
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
ComInterface.SOF_SignHashData = function (CertID, b64ashData, hashAlg, cb, ctx) {
|
|
1732
|
-
var ret = XTXAPP.SOF_SignHashData(CertID, b64ashData, hashAlg)
|
|
1733
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
WebsocketInterface.SOF_SignHashData = function (CertID, b64ashData, hashAlg, cb, ctx) {
|
|
1737
|
-
var paramArray = [CertID, b64ashData, hashAlg]
|
|
1738
|
-
WebsocketApp.callMethod('SOF_SignHashData', cb, ctx, 'string', paramArray)
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
|
-
ComInterface.SOF_VerifySignedHashData = function (Cert, b64ashData, SignValue, hashAlg, cb, ctx) {
|
|
1742
|
-
var ret = XTXAPP.SOF_VerifySignedHashData(Cert, b64ashData, SignValue, hashAlg)
|
|
1743
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
WebsocketInterface.SOF_VerifySignedHashData = function (Cert, b64ashData, SignValue, hashAlg, cb, ctx) {
|
|
1747
|
-
var paramArray = [Cert, b64ashData, SignValue, hashAlg]
|
|
1748
|
-
WebsocketApp.callMethod('SOF_VerifySignedHashData', cb, ctx, 'bool', paramArray)
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
ComInterface.CheckSoftDeviceEnv = function (cb, ctx) {
|
|
1752
|
-
var ret = XTXAPP.CheckSoftDeviceEnv()
|
|
1753
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
WebsocketInterface.CheckSoftDeviceEnv = function (cb, ctx) {
|
|
1757
|
-
var paramArray = []
|
|
1758
|
-
WebsocketApp.callMethod('CheckSoftDeviceEnv', cb, ctx, 'bool', paramArray)
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
ComInterface.SOF_SignBinaryData = function (CertID, cb, ctx) {
|
|
1762
|
-
var ret = XTXAPP.SOF_SignBinaryData(CertID)
|
|
1763
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
WebsocketInterface.SOF_SignBinaryData = function (CertID, cb, ctx) {
|
|
1767
|
-
var paramArray = [CertID]
|
|
1768
|
-
WebsocketApp.callMethod('SOF_SignBinaryData', cb, ctx, 'string', paramArray)
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
ComInterface.SOF_VerifySignedBinaryData = function (Cert, SignValue, cb, ctx) {
|
|
1772
|
-
var ret = XTXAPP.SOF_VerifySignedBinaryData(Cert, SignValue)
|
|
1773
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
WebsocketInterface.SOF_VerifySignedBinaryData = function (Cert, SignValue, cb, ctx) {
|
|
1777
|
-
var paramArray = [Cert, SignValue]
|
|
1778
|
-
WebsocketApp.callMethod('SOF_VerifySignedBinaryData', cb, ctx, 'bool', paramArray)
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
ComInterface.SOF_EncryptBinaryData = function (Cert, cb, ctx) {
|
|
1782
|
-
var ret = XTXAPP.SOF_EncryptBinaryData(Cert)
|
|
1783
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
WebsocketInterface.SOF_EncryptBinaryData = function (Cert, cb, ctx) {
|
|
1787
|
-
var paramArray = [Cert]
|
|
1788
|
-
WebsocketApp.callMethod('SOF_EncryptBinaryData', cb, ctx, 'string', paramArray)
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
ComInterface.SOF_EncryptBinaryDataEx = function (Cert, cb, ctx) {
|
|
1792
|
-
var ret = XTXAPP.SOF_EncryptBinaryDataEx(Cert)
|
|
1793
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
WebsocketInterface.SOF_EncryptBinaryDataEx = function (Cert, cb, ctx) {
|
|
1797
|
-
var paramArray = [Cert]
|
|
1798
|
-
WebsocketApp.callMethod('SOF_EncryptBinaryDataEx', cb, ctx, 'string', paramArray)
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
ComInterface.SOF_DecryptBinaryData = function (CertID, InData, cb, ctx) {
|
|
1802
|
-
var ret = XTXAPP.SOF_DecryptBinaryData(CertID, InData)
|
|
1803
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
WebsocketInterface.SOF_DecryptBinaryData = function (CertID, InData, cb, ctx) {
|
|
1807
|
-
var paramArray = [CertID, InData]
|
|
1808
|
-
WebsocketApp.callMethod('SOF_DecryptBinaryData', cb, ctx, 'string', paramArray)
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
ComInterface.SOF_SignBinaryMessage = function (dwFlag, CertID, cb, ctx) {
|
|
1812
|
-
var ret = XTXAPP.SOF_SignBinaryMessage(dwFlag, CertID)
|
|
1813
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
WebsocketInterface.SOF_SignBinaryMessage = function (dwFlag, CertID, cb, ctx) {
|
|
1817
|
-
var paramArray = [dwFlag, CertID]
|
|
1818
|
-
WebsocketApp.callMethod('SOF_SignBinaryMessage', cb, ctx, 'string', paramArray)
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
ComInterface.SOF_VerifySignedBinaryMessage = function (MessageData, cb, ctx) {
|
|
1822
|
-
var ret = XTXAPP.SOF_VerifySignedBinaryMessage(MessageData)
|
|
1823
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
WebsocketInterface.SOF_VerifySignedBinaryMessage = function (MessageData, cb, ctx) {
|
|
1827
|
-
var paramArray = [MessageData]
|
|
1828
|
-
WebsocketApp.callMethod('SOF_VerifySignedBinaryMessage', cb, ctx, 'bool', paramArray)
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
ComInterface.SOF_PubKeyBinaryEncrypt = function (Cert, cb, ctx) {
|
|
1832
|
-
var ret = XTXAPP.SOF_PubKeyBinaryEncrypt(Cert)
|
|
1833
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
WebsocketInterface.SOF_PubKeyBinaryEncrypt = function (Cert, cb, ctx) {
|
|
1837
|
-
var paramArray = [Cert]
|
|
1838
|
-
WebsocketApp.callMethod('SOF_PubKeyBinaryEncrypt', cb, ctx, 'string', paramArray)
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
ComInterface.SOF_PriKeyBinaryDecrypt = function (CertID, InData, cb, ctx) {
|
|
1842
|
-
var ret = XTXAPP.SOF_PriKeyBinaryDecrypt(CertID, InData)
|
|
1843
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
WebsocketInterface.SOF_PriKeyBinaryDecrypt = function (CertID, InData, cb, ctx) {
|
|
1847
|
-
var paramArray = [CertID, InData]
|
|
1848
|
-
WebsocketApp.callMethod('SOF_PriKeyBinaryDecrypt', cb, ctx, 'string', paramArray)
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
ComInterface.SOF_Base64BinaryEncode = function (cb, ctx) {
|
|
1852
|
-
var ret = XTXAPP.SOF_Base64BinaryEncode()
|
|
1853
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
WebsocketInterface.SOF_Base64BinaryEncode = function (cb, ctx) {
|
|
1857
|
-
var paramArray = []
|
|
1858
|
-
WebsocketApp.callMethod('SOF_Base64BinaryEncode', cb, ctx, 'string', paramArray)
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
ComInterface.SOF_Base64BinaryDecode = function (sIndata, cb, ctx) {
|
|
1862
|
-
var ret = XTXAPP.SOF_Base64BinaryDecode(sIndata)
|
|
1863
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
WebsocketInterface.SOF_Base64BinaryDecode = function (sIndata, cb, ctx) {
|
|
1867
|
-
var paramArray = [sIndata]
|
|
1868
|
-
WebsocketApp.callMethod('SOF_Base64BinaryDecode', cb, ctx, 'string', paramArray)
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
ComInterface.SOF_HashBinaryData = function (hashAlg, sCert, sID, cb, ctx) {
|
|
1872
|
-
var ret = XTXAPP.SOF_HashBinaryData(hashAlg, sCert, sID)
|
|
1873
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
WebsocketInterface.SOF_HashBinaryData = function (hashAlg, sCert, sID, cb, ctx) {
|
|
1877
|
-
var paramArray = [hashAlg, sCert, sID]
|
|
1878
|
-
WebsocketApp.callMethod('SOF_HashBinaryData', cb, ctx, 'string', paramArray)
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
ComInterface.SOF_SignBinaryDataByPriKey = function (sPriKey, sCert, cb, ctx) {
|
|
1882
|
-
var ret = XTXAPP.SOF_SignBinaryDataByPriKey(sPriKey, sCert)
|
|
1883
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
WebsocketInterface.SOF_SignBinaryDataByPriKey = function (sPriKey, sCert, cb, ctx) {
|
|
1887
|
-
var paramArray = [sPriKey, sCert]
|
|
1888
|
-
WebsocketApp.callMethod('SOF_SignBinaryDataByPriKey', cb, ctx, 'string', paramArray)
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
ComInterface.ImportPfxToDevice = function (sDeviceSN, sContainerName, bSign, strPfx, strPfxPass, cb, ctx) {
|
|
1892
|
-
var ret = XTXAPP.ImportPfxToDevice(sDeviceSN, sContainerName, bSign, strPfx, strPfxPass)
|
|
1893
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
WebsocketInterface.ImportPfxToDevice = function (sDeviceSN, sContainerName, bSign, strPfx, strPfxPass, cb, ctx) {
|
|
1897
|
-
var paramArray = [sDeviceSN, sContainerName, bSign, strPfx, strPfxPass]
|
|
1898
|
-
WebsocketApp.callMethod('ImportPfxToDevice', cb, ctx, 'bool', paramArray)
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
ComInterface.SOF_HashDataEx = function (hashAlg, sInData, sCert, sID, cb, ctx) {
|
|
1902
|
-
var ret = XTXAPP.SOF_HashDataEx(hashAlg, sInData, sCert, sID)
|
|
1903
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
WebsocketInterface.SOF_HashDataEx = function (hashAlg, sInData, sCert, sID, cb, ctx) {
|
|
1907
|
-
var paramArray = [hashAlg, sInData, sCert, sID]
|
|
1908
|
-
WebsocketApp.callMethod('SOF_HashDataEx', cb, ctx, 'string', paramArray)
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
ComInterface.SOF_HashFileEx = function (hashAlg, inFile, sCert, sID, cb, ctx) {
|
|
1912
|
-
var ret = XTXAPP.SOF_HashFileEx(hashAlg, inFile, sCert, sID)
|
|
1913
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
WebsocketInterface.SOF_HashFileEx = function (hashAlg, inFile, sCert, sID, cb, ctx) {
|
|
1917
|
-
var paramArray = [hashAlg, inFile, sCert, sID]
|
|
1918
|
-
WebsocketApp.callMethod('SOF_HashFileEx', cb, ctx, 'string', paramArray)
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
|
-
ComInterface.GetDeviceCountEx = function (type, cb, ctx) {
|
|
1922
|
-
var ret = XTXAPP.GetDeviceCountEx(type)
|
|
1923
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
WebsocketInterface.GetDeviceCountEx = function (type, cb, ctx) {
|
|
1927
|
-
var paramArray = [type]
|
|
1928
|
-
WebsocketApp.callMethod('GetDeviceCountEx', cb, ctx, 'number', paramArray)
|
|
1929
|
-
}
|
|
1930
|
-
|
|
1931
|
-
ComInterface.GetAllDeviceSNEx = function (type, cb, ctx) {
|
|
1932
|
-
var ret = XTXAPP.GetAllDeviceSNEx(type)
|
|
1933
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
WebsocketInterface.GetAllDeviceSNEx = function (type, cb, ctx) {
|
|
1937
|
-
var paramArray = [type]
|
|
1938
|
-
WebsocketApp.callMethod('GetAllDeviceSNEx', cb, ctx, 'string', paramArray)
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
ComInterface.SOF_UpdateCert = function (CertID, type, cb, ctx) {
|
|
1942
|
-
var ret = XTXAPP.SOF_UpdateCert(CertID, type)
|
|
1943
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
WebsocketInterface.SOF_UpdateCert = function (CertID, type, cb, ctx) {
|
|
1947
|
-
var paramArray = [CertID, type]
|
|
1948
|
-
WebsocketApp.callMethod('SOF_UpdateCert', cb, ctx, 'number', paramArray)
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
ComInterface.OpenSpecifiedFolder = function (backupFilePath, cb, ctx) {
|
|
1952
|
-
var ret = XTXAPP.OpenSpecifiedFolder(backupFilePath)
|
|
1953
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
WebsocketInterface.OpenSpecifiedFolder = function (backupFilePath, cb, ctx) {
|
|
1957
|
-
var paramArray = [backupFilePath]
|
|
1958
|
-
WebsocketApp.callMethod('OpenSpecifiedFolder', cb, ctx, 'string', paramArray)
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
ComInterface.OTP_GetChallengeCodeEx = function (sCertID, szAccount, money, cb, ctx) {
|
|
1962
|
-
var ret = XTXAPP.OTP_GetChallengeCodeEx(sCertID, szAccount, money)
|
|
1963
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
WebsocketInterface.OTP_GetChallengeCodeEx = function (sCertID, szAccount, money, cb, ctx) {
|
|
1967
|
-
var paramArray = [sCertID, szAccount, money]
|
|
1968
|
-
WebsocketApp.callMethod('OTP_GetChallengeCodeEx', cb, ctx, 'string', paramArray)
|
|
1969
|
-
}
|
|
1970
|
-
|
|
1971
|
-
ComInterface.Base64DecodeFile = function (sInData, sFilePath, cb, ctx) {
|
|
1972
|
-
var ret = XTXAPP.Base64DecodeFile(sInData, sFilePath)
|
|
1973
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
WebsocketInterface.Base64DecodeFile = function (sInData, sFilePath, cb, ctx) {
|
|
1977
|
-
var paramArray = [sInData, sFilePath]
|
|
1978
|
-
WebsocketApp.callMethod('Base64DecodeFile', cb, ctx, 'bool', paramArray)
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
ComInterface.EnumFilesInDevice = function (sDeviceSN, cb, ctx) {
|
|
1982
|
-
var ret = XTXAPP.EnumFilesInDevice(sDeviceSN)
|
|
1983
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
WebsocketInterface.EnumFilesInDevice = function (sDeviceSN, cb, ctx) {
|
|
1987
|
-
var paramArray = [sDeviceSN]
|
|
1988
|
-
WebsocketApp.callMethod('EnumFilesInDevice', cb, ctx, 'string', paramArray)
|
|
1989
|
-
}
|
|
1990
|
-
|
|
1991
|
-
ComInterface.OTP_Halt = function (sCertID, cb, ctx) {
|
|
1992
|
-
var ret = XTXAPP.OTP_Halt(sCertID)
|
|
1993
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
WebsocketInterface.OTP_Halt = function (sCertID, cb, ctx) {
|
|
1997
|
-
var paramArray = [sCertID]
|
|
1998
|
-
WebsocketApp.callMethod('OTP_Halt', cb, ctx, 'bool', paramArray)
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
ComInterface.SOF_TSGenREQ = function (b64Hash, hashAlg, bReqCert, policyID, b64Nonce, b64Extension, cb, ctx) {
|
|
2002
|
-
var ret = XTXAPP.SOF_TSGenREQ(b64Hash, hashAlg, bReqCert, policyID, b64Nonce, b64Extension)
|
|
2003
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
WebsocketInterface.SOF_TSGenREQ = function (b64Hash, hashAlg, bReqCert, policyID, b64Nonce, b64Extension, cb, ctx) {
|
|
2007
|
-
var paramArray = [b64Hash, hashAlg, bReqCert, policyID, b64Nonce, b64Extension]
|
|
2008
|
-
WebsocketApp.callMethod('SOF_TSGenREQ', cb, ctx, 'string', paramArray)
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
ComInterface.SOF_TSCompareNonce = function (b64TSReq, b64TSAResp, cb, ctx) {
|
|
2012
|
-
var ret = XTXAPP.SOF_TSCompareNonce(b64TSReq, b64TSAResp)
|
|
2013
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
WebsocketInterface.SOF_TSCompareNonce = function (b64TSReq, b64TSAResp, cb, ctx) {
|
|
2017
|
-
var paramArray = [b64TSReq, b64TSAResp]
|
|
2018
|
-
WebsocketApp.callMethod('SOF_TSCompareNonce', cb, ctx, 'bool', paramArray)
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
ComInterface.SOF_TSGenPDFSignature = function (b64TSAResp, b64OriPDFSignature, cb, ctx) {
|
|
2022
|
-
var ret = XTXAPP.SOF_TSGenPDFSignature(b64TSAResp, b64OriPDFSignature)
|
|
2023
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
WebsocketInterface.SOF_TSGenPDFSignature = function (b64TSAResp, b64OriPDFSignature, cb, ctx) {
|
|
2027
|
-
var paramArray = [b64TSAResp, b64OriPDFSignature]
|
|
2028
|
-
WebsocketApp.callMethod('SOF_TSGenPDFSignature', cb, ctx, 'string', paramArray)
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
ComInterface.SOF_TSVerifyPDFSignature = function (b64TSPDFSignature, cb, ctx) {
|
|
2032
|
-
var ret = XTXAPP.SOF_TSVerifyPDFSignature(b64TSPDFSignature)
|
|
2033
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
WebsocketInterface.SOF_TSVerifyPDFSignature = function (b64TSPDFSignature, cb, ctx) {
|
|
2037
|
-
var paramArray = [b64TSPDFSignature]
|
|
2038
|
-
WebsocketApp.callMethod('SOF_TSVerifyPDFSignature', cb, ctx, 'bool', paramArray)
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
ComInterface.SOF_TSGetPDFSignatureInfo = function (b64TSPDFSignature, iType, cb, ctx) {
|
|
2042
|
-
var ret = XTXAPP.SOF_TSGetPDFSignatureInfo(b64TSPDFSignature, iType)
|
|
2043
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
WebsocketInterface.SOF_TSGetPDFSignatureInfo = function (b64TSPDFSignature, iType, cb, ctx) {
|
|
2047
|
-
var paramArray = [b64TSPDFSignature, iType]
|
|
2048
|
-
WebsocketApp.callMethod('SOF_TSGetPDFSignatureInfo', cb, ctx, 'string', paramArray)
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
ComInterface.OTP_GetState = function (sCertID, bCert, cb, ctx) {
|
|
2052
|
-
var ret = XTXAPP.OTP_GetState(sCertID, bCert)
|
|
2053
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
WebsocketInterface.OTP_GetState = function (sCertID, bCert, cb, ctx) {
|
|
2057
|
-
var paramArray = [sCertID, bCert]
|
|
2058
|
-
WebsocketApp.callMethod('OTP_GetState', cb, ctx, 'string', paramArray)
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
ComInterface.OTP_GetSyncCode = function (sCertID, ChallengeCode, cb, ctx) {
|
|
2062
|
-
var ret = XTXAPP.OTP_GetSyncCode(sCertID, ChallengeCode)
|
|
2063
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2064
|
-
}
|
|
2065
|
-
|
|
2066
|
-
WebsocketInterface.OTP_GetSyncCode = function (sCertID, ChallengeCode, cb, ctx) {
|
|
2067
|
-
var paramArray = [sCertID, ChallengeCode]
|
|
2068
|
-
WebsocketApp.callMethod('OTP_GetSyncCode', cb, ctx, 'string', paramArray)
|
|
2069
|
-
}
|
|
2070
|
-
|
|
2071
|
-
ComInterface.SOF_IsLogin = function (CertID, cb, ctx) {
|
|
2072
|
-
var ret = XTXAPP.SOF_IsLogin(CertID)
|
|
2073
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
WebsocketInterface.SOF_IsLogin = function (CertID, cb, ctx) {
|
|
2077
|
-
var paramArray = [CertID]
|
|
2078
|
-
WebsocketApp.callMethod('SOF_IsLogin', cb, ctx, 'bool', paramArray)
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
ComInterface.SOF_LoginEx = function (CertID, PassWd, updateFlag, cb, ctx) {
|
|
2082
|
-
var ret = XTXAPP.SOF_LoginEx(CertID, PassWd, updateFlag)
|
|
2083
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
WebsocketInterface.SOF_LoginEx = function (CertID, PassWd, updateFlag, cb, ctx) {
|
|
2087
|
-
var paramArray = [CertID, PassWd, updateFlag]
|
|
2088
|
-
WebsocketApp.callMethod('SOF_LoginEx', cb, ctx, 'bool', paramArray)
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
ComInterface.EnumSupportDeviceList = function (cb, ctx) {
|
|
2092
|
-
var ret = XTXAPP.EnumSupportDeviceList()
|
|
2093
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
WebsocketInterface.EnumSupportDeviceList = function (cb, ctx) {
|
|
2097
|
-
var paramArray = []
|
|
2098
|
-
WebsocketApp.callMethod('EnumSupportDeviceList', cb, ctx, 'string', paramArray)
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
ComInterface.ExportPfxFromDevice = function (sDeviceSN, sContainerName, bSign, strPfxPass, cb, ctx) {
|
|
2102
|
-
var ret = XTXAPP.ExportPfxFromDevice(sDeviceSN, sContainerName, bSign, strPfxPass)
|
|
2103
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
WebsocketInterface.ExportPfxFromDevice = function (sDeviceSN, sContainerName, bSign, strPfxPass, cb, ctx) {
|
|
2107
|
-
var paramArray = [sDeviceSN, sContainerName, bSign, strPfxPass]
|
|
2108
|
-
WebsocketApp.callMethod('ExportPfxFromDevice', cb, ctx, 'string', paramArray)
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
|
-
ComInterface.SOF_SignHashMessage = function (CertID, InHashData, hashAlg, cb, ctx) {
|
|
2112
|
-
var ret = XTXAPP.SOF_SignHashMessage(CertID, InHashData, hashAlg)
|
|
2113
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
WebsocketInterface.SOF_SignHashMessage = function (CertID, InHashData, hashAlg, cb, ctx) {
|
|
2117
|
-
var paramArray = [CertID, InHashData, hashAlg]
|
|
2118
|
-
WebsocketApp.callMethod('SOF_SignHashMessage', cb, ctx, 'string', paramArray)
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
ComInterface.ExportPfxToFile = function (sDeviceSN, sContainerName, bSign, strPfxPass, cb, ctx) {
|
|
2122
|
-
var ret = XTXAPP.ExportPfxToFile(sDeviceSN, sContainerName, bSign, strPfxPass)
|
|
2123
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
WebsocketInterface.ExportPfxToFile = function (sDeviceSN, sContainerName, bSign, strPfxPass, cb, ctx) {
|
|
2127
|
-
var paramArray = [sDeviceSN, sContainerName, bSign, strPfxPass]
|
|
2128
|
-
WebsocketApp.callMethod('ExportPfxToFile', cb, ctx, 'string', paramArray)
|
|
2129
|
-
}
|
|
2130
|
-
|
|
2131
|
-
ComInterface.SOF_SignAPK = function (CertID, strOriSignature, cb, ctx) {
|
|
2132
|
-
var ret = XTXAPP.SOF_SignAPK(CertID, strOriSignature)
|
|
2133
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
WebsocketInterface.SOF_SignAPK = function (CertID, strOriSignature, cb, ctx) {
|
|
2137
|
-
var paramArray = [CertID, strOriSignature]
|
|
2138
|
-
WebsocketApp.callMethod('SOF_SignAPK', cb, ctx, 'string', paramArray)
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
|
-
ComInterface.SOF_ListenUKey = function (Parm, cb, ctx) {
|
|
2142
|
-
var ret = XTXAPP.SOF_ListenUKey(Parm)
|
|
2143
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
WebsocketInterface.SOF_ListenUKey = function (Parm, cb, ctx) {
|
|
2147
|
-
var paramArray = [Parm]
|
|
2148
|
-
WebsocketApp.callMethod('SOF_ListenUKey', cb, ctx, 'string', paramArray)
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
ComInterface.SOF_EnableLoginWindow = function (Parm, cb, ctx) {
|
|
2152
|
-
var ret = XTXAPP.SOF_EnableLoginWindow(Parm)
|
|
2153
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
WebsocketInterface.SOF_EnableLoginWindow = function (Parm, cb, ctx) {
|
|
2157
|
-
var paramArray = [Parm]
|
|
2158
|
-
WebsocketApp.callMethod('SOF_EnableLoginWindow', cb, ctx, 'string', paramArray)
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
ComInterface.SOF_SignEnvelope = function (CertID, Cert, InData, cb, ctx) {
|
|
2162
|
-
var ret = XTXAPP.SOF_SignEnvelope(CertID, Cert, InData)
|
|
2163
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
WebsocketInterface.SOF_SignEnvelope = function (CertID, Cert, InData, cb, ctx) {
|
|
2167
|
-
var paramArray = [CertID, Cert, InData]
|
|
2168
|
-
WebsocketApp.callMethod('SOF_SignEnvelope', cb, ctx, 'string', paramArray)
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
ComInterface.SOF_UnSignEnvelope = function (CertID, InData, cb, ctx) {
|
|
2172
|
-
var ret = XTXAPP.SOF_UnSignEnvelope(CertID, InData)
|
|
2173
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2174
|
-
}
|
|
2175
|
-
|
|
2176
|
-
WebsocketInterface.SOF_UnSignEnvelope = function (CertID, InData, cb, ctx) {
|
|
2177
|
-
var paramArray = [CertID, InData]
|
|
2178
|
-
WebsocketApp.callMethod('SOF_UnSignEnvelope', cb, ctx, 'string', paramArray)
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
init_Interface('SOF_SetSignMethod', 'SetSignMethod')
|
|
2182
|
-
init_Interface('SOF_GetSignMethod')
|
|
2183
|
-
init_Interface('SOF_SetEncryptMethod')
|
|
2184
|
-
init_Interface('SOF_GetEncryptMethod')
|
|
2185
|
-
init_Interface('SOF_GetUserList', 'GetUserList')
|
|
2186
|
-
init_Interface('SOF_ExportUserCert', 'GetSignCert')
|
|
2187
|
-
init_Interface('SOF_Login', 'VerifyUserPIN')
|
|
2188
|
-
init_Interface('SOF_GetPinRetryCount', 'GetUserPINRetryCount')
|
|
2189
|
-
init_Interface('SOF_ChangePassWd', 'ChangeUserPassword')
|
|
2190
|
-
init_Interface('SOF_GetCertInfo', 'GetCertBasicinfo')
|
|
2191
|
-
init_Interface('SOF_GetCertInfoByOid', 'GetExtCertInfoByOID')
|
|
2192
|
-
init_Interface('SOF_SignData', 'SignedData')
|
|
2193
|
-
init_Interface('SOF_VerifySignedData', 'VerifySignedData')
|
|
2194
|
-
init_Interface('SOF_SignFile', 'SignFile')
|
|
2195
|
-
init_Interface('SOF_VerifySignedFile', 'VerifySignFile')
|
|
2196
|
-
init_Interface('SOF_EncryptData', 'EncodeP7Enveloped')
|
|
2197
|
-
init_Interface('SOF_DecryptData', 'DecodeP7Enveloped')
|
|
2198
|
-
init_Interface('SOF_EncryptFile')
|
|
2199
|
-
init_Interface('SOF_DecryptFile')
|
|
2200
|
-
init_Interface('SOF_SignMessage', 'SignByP7')
|
|
2201
|
-
init_Interface('SOF_VerifySignedMessage', 'VerifyDatabyP7')
|
|
2202
|
-
init_Interface('SOF_GetInfoFromSignedMessage')
|
|
2203
|
-
init_Interface('SOF_SignDataXML')
|
|
2204
|
-
init_Interface('SOF_VerifySignedDataXML')
|
|
2205
|
-
init_Interface('SOF_GetXMLSignatureInfo')
|
|
2206
|
-
init_Interface('SOF_GenRandom', 'GenerateRandom')
|
|
2207
|
-
init_Interface('SOF_PubKeyEncrypt', 'PubKeyEncrypt')
|
|
2208
|
-
init_Interface('SOF_PriKeyDecrypt', 'PriKeyDecrypt')
|
|
2209
|
-
init_Interface('SOF_SecertSegment')
|
|
2210
|
-
init_Interface('SOF_SecertRecovery')
|
|
2211
|
-
init_Interface('SOF_GetLastError')
|
|
2212
|
-
init_Interface('GetDeviceCount')
|
|
2213
|
-
init_Interface('GetAllDeviceSN')
|
|
2214
|
-
init_Interface('GetDeviceSNByIndex')
|
|
2215
|
-
init_Interface('GetDeviceInfo')
|
|
2216
|
-
init_Interface('ChangeAdminPass')
|
|
2217
|
-
init_Interface('UnlockUserPass')
|
|
2218
|
-
init_Interface('GenerateKeyPair')
|
|
2219
|
-
init_Interface('ExportPubKey')
|
|
2220
|
-
init_Interface('ImportSignCert')
|
|
2221
|
-
init_Interface('ImportEncCert')
|
|
2222
|
-
init_Interface('ReadFile')
|
|
2223
|
-
init_Interface('WriteFile')
|
|
2224
|
-
init_Interface('IsContainerExist')
|
|
2225
|
-
init_Interface('DeleteContainer')
|
|
2226
|
-
init_Interface('ExportPKCS10')
|
|
2227
|
-
init_Interface('InitDevice')
|
|
2228
|
-
init_Interface('CertListFormElement')
|
|
2229
|
-
init_Interface('AlertBeforeCertDate')
|
|
2230
|
-
init_Interface('ServerSignedData')
|
|
2231
|
-
init_Interface('ServerRan')
|
|
2232
|
-
init_Interface('ServerCert')
|
|
2233
|
-
init_Interface('ServerMode')
|
|
2234
|
-
init_Interface('ShowError')
|
|
2235
|
-
init_Interface('AddSignInfo')
|
|
2236
|
-
init_Interface('SOF_GetVersion')
|
|
2237
|
-
init_Interface('SOF_ExportExChangeUserCert', 'GetExchCert')
|
|
2238
|
-
init_Interface('SOF_ValidateCert', 'ValidateCert')
|
|
2239
|
-
init_Interface('GetENVSN')
|
|
2240
|
-
init_Interface('SetENVSN')
|
|
2241
|
-
init_Interface('IsDeviceExist')
|
|
2242
|
-
init_Interface('GetContainerCount')
|
|
2243
|
-
init_Interface('SOF_SymEncryptData', 'EncryptData')
|
|
2244
|
-
init_Interface('SOF_SymDecryptData', 'DecryptData')
|
|
2245
|
-
init_Interface('SOF_SymEncryptFile', 'EncryptFile')
|
|
2246
|
-
init_Interface('SOF_SymDecryptFile', 'DecryptFile')
|
|
2247
|
-
init_Interface('SOF_GetLastErrMsg')
|
|
2248
|
-
init_Interface('SOF_Base64Encode')
|
|
2249
|
-
init_Interface('SOF_Base64Decode')
|
|
2250
|
-
init_Interface('SOF_HashData', 'SignHashData')
|
|
2251
|
-
init_Interface('SOF_HashFile', 'HashFile')
|
|
2252
|
-
init_Interface('UnlockUserPassEx')
|
|
2253
|
-
init_Interface('DeleteOldContainer')
|
|
2254
|
-
init_Interface('WriteFileEx')
|
|
2255
|
-
init_Interface('ReadFileEx')
|
|
2256
|
-
init_Interface('SOF_EncryptDataEx', 'EncodeP7Enveloped')
|
|
2257
|
-
init_Interface('Base64EncodeFile')
|
|
2258
|
-
init_Interface('SOF_GetRetryCount')
|
|
2259
|
-
init_Interface('SOF_GetAllContainerName')
|
|
2260
|
-
init_Interface('CreateSoftDevice')
|
|
2261
|
-
init_Interface('DeleteSoftDevice')
|
|
2262
|
-
init_Interface('EnableSoftDevice')
|
|
2263
|
-
init_Interface('SoftDeviceBackup')
|
|
2264
|
-
init_Interface('SoftDeviceRestore')
|
|
2265
|
-
init_Interface('SOF_Logout', 'Logout')
|
|
2266
|
-
init_Interface('SetUserConfig')
|
|
2267
|
-
init_Interface('SOF_SignByteData')
|
|
2268
|
-
init_Interface('SOF_VerifySignedByteData')
|
|
2269
|
-
init_Interface('OTP_GetChallengeCode')
|
|
2270
|
-
init_Interface('ImportEncCertEx')
|
|
2271
|
-
init_Interface('SOF_GetCertEntity', 'GetCertEntity')
|
|
2272
|
-
init_Interface('SOF_HMAC')
|
|
2273
|
-
init_Interface('SOF_SignDataByPriKey')
|
|
2274
|
-
init_Interface('ImportKeyCertToSoftDevice')
|
|
2275
|
-
init_Interface('InitDeviceEx')
|
|
2276
|
-
init_Interface('SelectFile')
|
|
2277
|
-
init_Interface('SOF_SignHashData', 'SignHashData')
|
|
2278
|
-
init_Interface('SOF_VerifySignedHashData', 'VerifySignedHashData')
|
|
2279
|
-
init_Interface('CheckSoftDeviceEnv')
|
|
2280
|
-
init_Interface('SOF_SignBinaryData')
|
|
2281
|
-
init_Interface('SOF_VerifySignedBinaryData')
|
|
2282
|
-
init_Interface('SOF_EncryptBinaryData')
|
|
2283
|
-
init_Interface('SOF_EncryptBinaryDataEx')
|
|
2284
|
-
init_Interface('SOF_DecryptBinaryData')
|
|
2285
|
-
init_Interface('SOF_SignBinaryMessage')
|
|
2286
|
-
init_Interface('SOF_VerifySignedBinaryMessage')
|
|
2287
|
-
init_Interface('SOF_PubKeyBinaryEncrypt')
|
|
2288
|
-
init_Interface('SOF_PriKeyBinaryDecrypt')
|
|
2289
|
-
init_Interface('SOF_Base64BinaryEncode')
|
|
2290
|
-
init_Interface('SOF_Base64BinaryDecode')
|
|
2291
|
-
init_Interface('SOF_HashBinaryData')
|
|
2292
|
-
init_Interface('SOF_SignBinaryDataByPriKey')
|
|
2293
|
-
init_Interface('ImportPfxToDevice')
|
|
2294
|
-
init_Interface('SOF_HashDataEx')
|
|
2295
|
-
init_Interface('SOF_HashFileEx')
|
|
2296
|
-
init_Interface('GetDeviceCountEx')
|
|
2297
|
-
init_Interface('GetAllDeviceSNEx')
|
|
2298
|
-
init_Interface('SOF_UpdateCert')
|
|
2299
|
-
init_Interface('OpenSpecifiedFolder')
|
|
2300
|
-
init_Interface('OTP_GetChallengeCodeEx')
|
|
2301
|
-
init_Interface('Base64DecodeFile')
|
|
2302
|
-
init_Interface('EnumFilesInDevice')
|
|
2303
|
-
init_Interface('OTP_Halt')
|
|
2304
|
-
init_Interface('SOF_TSGenREQ')
|
|
2305
|
-
init_Interface('SOF_TSCompareNonce')
|
|
2306
|
-
init_Interface('SOF_TSGenPDFSignature')
|
|
2307
|
-
init_Interface('SOF_TSVerifyPDFSignature')
|
|
2308
|
-
init_Interface('SOF_TSGetPDFSignatureInfo')
|
|
2309
|
-
init_Interface('OTP_GetState')
|
|
2310
|
-
init_Interface('OTP_GetSyncCode')
|
|
2311
|
-
init_Interface('SOF_IsLogin')
|
|
2312
|
-
init_Interface('SOF_LoginEx')
|
|
2313
|
-
init_Interface('EnumSupportDeviceList')
|
|
2314
|
-
init_Interface('ExportPfxFromDevice')
|
|
2315
|
-
init_Interface('SOF_SignHashMessage')
|
|
2316
|
-
init_Interface('ExportPfxToFile')
|
|
2317
|
-
init_Interface('SOF_SignAPK')
|
|
2318
|
-
init_Interface('SOF_ListenUKey')
|
|
2319
|
-
init_Interface('SOF_EnableLoginWindow')
|
|
2320
|
-
init_Interface('SOF_SignEnvelope')
|
|
2321
|
-
init_Interface('SOF_UnSignEnvelope')
|
|
2322
|
-
|
|
2323
|
-
//template_gen_end
|
|
2324
|
-
|
|
2325
|
-
//getpic template_gen
|
|
2326
|
-
PicComInterface.GetPic = function (bstrConName, cb, ctx) {
|
|
2327
|
-
var ret = OGetPic.GetPic(bstrConName)
|
|
2328
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2329
|
-
}
|
|
2330
|
-
|
|
2331
|
-
WebsocketInterface.GetPic = function (bstrConName, cb, ctx) {
|
|
2332
|
-
var paramArray = [bstrConName]
|
|
2333
|
-
WebsocketApp.callMethod('GetPic', cb, ctx, 'string', paramArray)
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
PicComInterface.Hash = function (inData, cb, ctx) {
|
|
2337
|
-
var ret = OGetPic.Hash(inData)
|
|
2338
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2339
|
-
}
|
|
2340
|
-
|
|
2341
|
-
WebsocketInterface.Hash = function (inData, cb, ctx) {
|
|
2342
|
-
var paramArray = [inData]
|
|
2343
|
-
WebsocketApp.callMethod('Hash', cb, ctx, 'string', paramArray)
|
|
2344
|
-
}
|
|
2345
|
-
|
|
2346
|
-
PicComInterface.ConvertPicFormat = function (inData, type, cb, ctx) {
|
|
2347
|
-
var ret = OGetPic.ConvertPicFormat(inData, type)
|
|
2348
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
|
-
WebsocketInterface.ConvertPicFormat = function (inData, type, cb, ctx) {
|
|
2352
|
-
var paramArray = [inData, type]
|
|
2353
|
-
WebsocketApp.callMethod('ConvertPicFormat', cb, ctx, 'string', paramArray)
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
|
-
PicComInterface.ConvertGif2Jpg = function (inData, cb, ctx) {
|
|
2357
|
-
var ret = OGetPic.ConvertGif2Jpg(inData)
|
|
2358
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
WebsocketInterface.ConvertGif2Jpg = function (inData, cb, ctx) {
|
|
2362
|
-
var paramArray = [inData]
|
|
2363
|
-
WebsocketApp.callMethod('ConvertGif2Jpg', cb, ctx, 'string', paramArray)
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
PicComInterface.GetPic1 = function (bstrConName, cb, ctx) {
|
|
2367
|
-
var ret = OGetPic.GetPic1(bstrConName)
|
|
2368
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
WebsocketInterface.GetPic1 = function (bstrConName, cb, ctx) {
|
|
2372
|
-
var paramArray = [bstrConName]
|
|
2373
|
-
WebsocketApp.callMethod('GetPic1', cb, ctx, 'string', paramArray)
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
PicComInterface.ConvertPicSize = function (bstrPic, w, h, cb, ctx) {
|
|
2377
|
-
var ret = OGetPic.ConvertPicSize(bstrPic, w, h)
|
|
2378
|
-
return $myOKRtnFunc(ret, cb, ctx)
|
|
2379
|
-
}
|
|
2380
|
-
|
|
2381
|
-
WebsocketInterface.ConvertPicSize = function (bstrPic, w, h, cb, ctx) {
|
|
2382
|
-
var paramArray = [bstrPic, w, h]
|
|
2383
|
-
WebsocketApp.callMethod('ConvertPicSize', cb, ctx, 'string', paramArray)
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
init_Interface('GetPic')
|
|
2387
|
-
init_Interface('Hash')
|
|
2388
|
-
init_Interface('ConvertPicFormat')
|
|
2389
|
-
init_Interface('ConvertGif2Jpg')
|
|
2390
|
-
init_Interface('GetPic1')
|
|
2391
|
-
init_Interface('ConvertPicSize')
|
|
2392
|
-
|
|
2393
|
-
//getpic template_gen_end
|
|
2394
|
-
|
|
2395
|
-
window._bjca_init_ = init
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
/*--------------------------------------------------------------------------
|
|
4
|
+
*
|
|
5
|
+
* BJCA Adaptive Javascript, Version SAB(Support All Browsers :))
|
|
6
|
+
* This script support bjca client version 2.0 and later
|
|
7
|
+
* Author:BJCA-zys
|
|
8
|
+
*--------------------------------------------------------------------------*/
|
|
9
|
+
|
|
10
|
+
/* globals var */
|
|
11
|
+
var $_$softCertListID = '' // Soft CertListID, Set by SetUserCertList
|
|
12
|
+
var $_$hardCertListID = '' // USBKeyCertListID, Set by SetUserCertList
|
|
13
|
+
var $_$allCertListID = '' // All CertListID, Set by SetUserCertList
|
|
14
|
+
var $_$loginCertID = '' // logined CertID, Set by SetAutoLogoutParameter
|
|
15
|
+
var $_$logoutFunc = null // logout Function, Set by SetAutoLogoutParameter
|
|
16
|
+
var $_$onUsbKeyChangeCallBackFunc = null //custom onUsbkeyChange callback function
|
|
17
|
+
var $_$XTXAlert = null // alert custom function
|
|
18
|
+
var $_$XTXAppObj = null // XTXAppCOM class Object
|
|
19
|
+
var $_$SecXV2Obj = null // BJCASecCOMV2 class Object
|
|
20
|
+
var $_$SecXObj = null // BJCASecCOM class Object
|
|
21
|
+
var $_$WebSocketObj = null // WebSocket class Object
|
|
22
|
+
var $_$CurrentObj = null // Current use class Object
|
|
23
|
+
var $_$GetPicObj = null // GetKeyPic class Object
|
|
24
|
+
|
|
25
|
+
// const var
|
|
26
|
+
var CERT_TYPE_HARD = 1
|
|
27
|
+
var CERT_TYPE_SOFT = 2
|
|
28
|
+
var CERT_TYPE_ALL = 3
|
|
29
|
+
|
|
30
|
+
// const var
|
|
31
|
+
var CERT_OID_VERSION = 1
|
|
32
|
+
var CERT_OID_SERIAL = 2
|
|
33
|
+
var CERT_OID_SIGN_METHOD = 3
|
|
34
|
+
var CERT_OID_ISSUER_C = 4
|
|
35
|
+
var CERT_OID_ISSUER_O = 5
|
|
36
|
+
var CERT_OID_ISSUER_OU = 6
|
|
37
|
+
var CERT_OID_ISSUER_ST = 7
|
|
38
|
+
var CERT_OID_ISSUER_CN = 8
|
|
39
|
+
var CERT_OID_ISSUER_L = 9
|
|
40
|
+
var CERT_OID_ISSUER_E = 10
|
|
41
|
+
var CERT_OID_NOT_BEFORE = 11
|
|
42
|
+
var CERT_OID_NOT_AFTER = 12
|
|
43
|
+
var CERT_OID_SUBJECT_C = 13
|
|
44
|
+
var CERT_OID_SUBJECT_O = 14
|
|
45
|
+
var CERT_OID_SUBJECT_OU = 15
|
|
46
|
+
var CERT_OID_SUBJECT_ST = 16
|
|
47
|
+
var CERT_OID_SUBJECT_CN = 17
|
|
48
|
+
var CERT_OID_SUBJECT_L = 18
|
|
49
|
+
var CERT_OID_SUBJECT_E = 19
|
|
50
|
+
var CERT_OID_PUBKEY = 20
|
|
51
|
+
var CERT_OID_SUBJECT_DN = 33
|
|
52
|
+
var CERT_OID_ISSUER_DN = 34
|
|
53
|
+
|
|
54
|
+
// set auto logout parameters
|
|
55
|
+
function SetAutoLogoutParameter(strCertID, logoutFunc) {
|
|
56
|
+
$_$loginCertID = strCertID
|
|
57
|
+
$_$logoutFunc = logoutFunc
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function SetLoginCertID(strCertID) {
|
|
62
|
+
$_$loginCertID = strCertID
|
|
63
|
+
return
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function SetLogoutFunction(logoutFunc) {
|
|
67
|
+
$_$logoutFunc = logoutFunc
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function GetDateNotBefore(strCertValid) {
|
|
71
|
+
var strYear = strCertValid.substring(0, 4)
|
|
72
|
+
var strMonth = strCertValid.substring(4, 6)
|
|
73
|
+
var strDay = strCertValid.substring(6, 8)
|
|
74
|
+
var strHour = strCertValid.substring(8, 10)
|
|
75
|
+
var strMin = strCertValid.substring(10, 12)
|
|
76
|
+
var strSecond = strCertValid.substring(12, 14)
|
|
77
|
+
var RtnDate = new Date()
|
|
78
|
+
RtnDate.setFullYear(Number(strYear), Number(strMonth) - 1, Number(strDay))
|
|
79
|
+
RtnDate.setHours(Number(strHour))
|
|
80
|
+
RtnDate.setMinutes(Number(strMin))
|
|
81
|
+
RtnDate.setSeconds(Number(strSecond))
|
|
82
|
+
return RtnDate
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function GetDateNotAfter(strCertValid) {
|
|
86
|
+
var strYear = strCertValid.substring(0, 4)
|
|
87
|
+
var strMonth = strCertValid.substring(4, 6)
|
|
88
|
+
var strDay = strCertValid.substring(6, 8)
|
|
89
|
+
var strHour = strCertValid.substring(8, 10)
|
|
90
|
+
var strMin = strCertValid.substring(10, 12)
|
|
91
|
+
var strSecond = strCertValid.substring(12, 14)
|
|
92
|
+
var RtnDate = new Date()
|
|
93
|
+
RtnDate.setFullYear(Number(strYear), Number(strMonth) - 1, Number(strDay))
|
|
94
|
+
RtnDate.setHours(Number(strHour))
|
|
95
|
+
RtnDate.setMinutes(Number(strMin))
|
|
96
|
+
RtnDate.setSeconds(Number(strSecond))
|
|
97
|
+
return RtnDate
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// set user cert list id
|
|
101
|
+
function SetUserCertList(strListID, certType) {
|
|
102
|
+
if (arguments.length == 1) {
|
|
103
|
+
$_$hardCertListID = strListID
|
|
104
|
+
} else {
|
|
105
|
+
if (certType == CERT_TYPE_HARD) {
|
|
106
|
+
$_$hardCertListID = strListID
|
|
107
|
+
}
|
|
108
|
+
if (certType == CERT_TYPE_SOFT) {
|
|
109
|
+
$_$softCertListID = strListID
|
|
110
|
+
}
|
|
111
|
+
if (certType == CERT_TYPE_ALL) {
|
|
112
|
+
$_$allCertListID = strListID
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
GetUserList($pushAllDropListBox)
|
|
116
|
+
|
|
117
|
+
return
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// set custom usbkeychange callback
|
|
121
|
+
function SetOnUsbKeyChangeCallBack(callback) {
|
|
122
|
+
$_$onUsbKeyChangeCallBackFunc = callback
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// set custom alert function
|
|
126
|
+
function SetAlertFunction(custom_alert) {
|
|
127
|
+
$_$XTXAlert = custom_alert
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function $checkBrowserISIE() {
|
|
131
|
+
return !!(!!window.ActiveXObject || 'ActiveXObject' in window)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function $popDropListBoxAll(strListID) {
|
|
135
|
+
var objListID = eval(strListID)
|
|
136
|
+
if (objListID == undefined) {
|
|
137
|
+
return
|
|
138
|
+
}
|
|
139
|
+
var i,
|
|
140
|
+
n = objListID.length
|
|
141
|
+
for (i = 0; i < n; i++) {
|
|
142
|
+
objListID.remove(0)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
objListID = null
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function $pushOneDropListBox(userListArray, strListID) {
|
|
149
|
+
var objListID = eval(strListID)
|
|
150
|
+
if (objListID == undefined) {
|
|
151
|
+
return
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
var i
|
|
155
|
+
for (i = 0; i < userListArray.length; i++) {
|
|
156
|
+
var certObj = userListArray[i]
|
|
157
|
+
var objItem = new Option(certObj.certName, certObj.certID)
|
|
158
|
+
objListID.options.add(objItem)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
objListID = null
|
|
162
|
+
|
|
163
|
+
return
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function $pushAllDropListBox(certUserListObj) {
|
|
167
|
+
if ($_$hardCertListID != '') {
|
|
168
|
+
$popDropListBoxAll($_$hardCertListID)
|
|
169
|
+
}
|
|
170
|
+
if ($_$softCertListID != '') {
|
|
171
|
+
$popDropListBoxAll($_$softCertListID)
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if ($_$allCertListID != '') {
|
|
175
|
+
$popDropListBoxAll($_$allCertListID)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
var strUserList = certUserListObj.retVal
|
|
179
|
+
var allListArray = []
|
|
180
|
+
while (true) {
|
|
181
|
+
var i = strUserList.indexOf('&&&')
|
|
182
|
+
if (i <= 0) {
|
|
183
|
+
break
|
|
184
|
+
}
|
|
185
|
+
var strOneUser = strUserList.substring(0, i)
|
|
186
|
+
var strName = strOneUser.substring(0, strOneUser.indexOf('||'))
|
|
187
|
+
var strCertID = strOneUser.substring(strOneUser.indexOf('||') + 2, strOneUser.length)
|
|
188
|
+
allListArray.push({ certName: strName, certID: strCertID })
|
|
189
|
+
|
|
190
|
+
if ($_$hardCertListID != '') {
|
|
191
|
+
GetDeviceType(
|
|
192
|
+
strCertID,
|
|
193
|
+
function (retObj) {
|
|
194
|
+
if (retObj.retVal == 'HARD') {
|
|
195
|
+
$pushOneDropListBox([retObj.ctx], $_$hardCertListID)
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{ certName: strName, certID: strCertID }
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if ($_$softCertListID != '') {
|
|
203
|
+
GetDeviceType(
|
|
204
|
+
strCertID,
|
|
205
|
+
function (retObj) {
|
|
206
|
+
if (retObj.retVal == 'SOFT') {
|
|
207
|
+
$pushOneDropListBox([retObj.ctx], $_$softCertListID)
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
{ certName: strName, certID: strCertID }
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
var len = strUserList.length
|
|
214
|
+
strUserList = strUserList.substring(i + 3, len)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if ($_$allCertListID != '') {
|
|
218
|
+
$pushOneDropListBox(allListArray, $_$allCertListID)
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function $myAutoLogoutCallBack(retObj) {
|
|
223
|
+
if (retObj.retVal.indexOf($_$loginCertID) <= 0) {
|
|
224
|
+
$_$logoutFunc()
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
//usbkey change default callback function
|
|
229
|
+
function $OnUsbKeyChange() {
|
|
230
|
+
GetUserList($pushAllDropListBox)
|
|
231
|
+
if (typeof $_$onUsbKeyChangeCallBackFunc === 'function') {
|
|
232
|
+
$_$onUsbKeyChangeCallBackFunc()
|
|
233
|
+
}
|
|
234
|
+
if ($_$loginCertID != '' && typeof $_$logoutFunc === 'function') {
|
|
235
|
+
GetUserList($myAutoLogoutCallBack)
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// IE11 attach event
|
|
240
|
+
function $AttachIE11OnUSBKeychangeEvent(strObjName) {
|
|
241
|
+
var handler = document.createElement('script')
|
|
242
|
+
handler.setAttribute('for', strObjName)
|
|
243
|
+
handler.setAttribute('event', 'OnUsbKeyChange')
|
|
244
|
+
handler.appendChild(document.createTextNode('$OnUsbKeyChange()'))
|
|
245
|
+
document.body.appendChild(handler)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
//load a control
|
|
249
|
+
function $LoadControl(CLSID, ctlName, testFuncName, addEvent) {
|
|
250
|
+
var pluginDiv = document.getElementById('pluginDiv' + ctlName)
|
|
251
|
+
if (pluginDiv) {
|
|
252
|
+
return true
|
|
253
|
+
}
|
|
254
|
+
pluginDiv = document.createElement('div')
|
|
255
|
+
pluginDiv.id = 'pluginDiv' + ctlName
|
|
256
|
+
document.body.appendChild(pluginDiv)
|
|
257
|
+
|
|
258
|
+
try {
|
|
259
|
+
if ($checkBrowserISIE()) {
|
|
260
|
+
// IE
|
|
261
|
+
pluginDiv.innerHTML =
|
|
262
|
+
'<object id="' + ctlName + '" classid="CLSID:' + CLSID + '" style="HEIGHT:0px; WIDTH:0px"></object>'
|
|
263
|
+
if (addEvent) {
|
|
264
|
+
var clt = eval(ctlName)
|
|
265
|
+
if (clt.attachEvent) {
|
|
266
|
+
clt.attachEvent('OnUsbKeyChange', $OnUsbKeyChange)
|
|
267
|
+
} else {
|
|
268
|
+
// IE11 not support attachEvent, and addEventListener do not work well, so addEvent ourself
|
|
269
|
+
$AttachIE11OnUSBKeychangeEvent(ctlName)
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
} else {
|
|
273
|
+
var chromeVersion = window.navigator.userAgent.match(/Chrome\/(\d+)\./)
|
|
274
|
+
if (chromeVersion && chromeVersion[1]) {
|
|
275
|
+
if (parseInt(chromeVersion[1], 10) >= 42) {
|
|
276
|
+
// not support npapi return false
|
|
277
|
+
document.body.removeChild(pluginDiv)
|
|
278
|
+
pluginDiv.innerHTML = ''
|
|
279
|
+
pluginDiv = null
|
|
280
|
+
return false
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (addEvent) {
|
|
285
|
+
pluginDiv.innerHTML =
|
|
286
|
+
'<embed id=' +
|
|
287
|
+
ctlName +
|
|
288
|
+
' type=application/x-xtx-axhost clsid={' +
|
|
289
|
+
CLSID +
|
|
290
|
+
'} event_OnUsbkeyChange=$OnUsbKeyChange width=0 height=0 />'
|
|
291
|
+
} else {
|
|
292
|
+
pluginDiv.innerHTML =
|
|
293
|
+
'<embed id=' + ctlName + ' type=application/x-xtx-axhost clsid={' + CLSID + '} width=0 height=0 />'
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if (testFuncName != null && testFuncName != '' && eval(ctlName + '.' + testFuncName) == undefined) {
|
|
298
|
+
document.body.removeChild(pluginDiv)
|
|
299
|
+
pluginDiv.innerHTML = ''
|
|
300
|
+
pluginDiv = null
|
|
301
|
+
return false
|
|
302
|
+
}
|
|
303
|
+
return true
|
|
304
|
+
} catch (e) {
|
|
305
|
+
document.body.removeChild(pluginDiv)
|
|
306
|
+
pluginDiv.innerHTML = ''
|
|
307
|
+
pluginDiv = null
|
|
308
|
+
return false
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function $XTXAlert(strMsg) {
|
|
313
|
+
if (typeof $_$XTXAlert === 'function') {
|
|
314
|
+
$_$XTXAlert(strMsg)
|
|
315
|
+
} else {
|
|
316
|
+
alert(strMsg)
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
function $myOKRtnFunc(retVal, cb, ctx) {
|
|
321
|
+
if (typeof cb === 'function') {
|
|
322
|
+
var retObj = { retVal: retVal, ctx: ctx }
|
|
323
|
+
cb(retObj)
|
|
324
|
+
}
|
|
325
|
+
return retVal
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function $myErrorRtnFunc(retVal, cb, ctx) {
|
|
329
|
+
if (typeof cb === 'function') {
|
|
330
|
+
var retObj = { retVal: retVal, ctx: ctx }
|
|
331
|
+
cb(retObj)
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return retVal
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
function $loginSignRandomCallBack(retObj) {
|
|
338
|
+
if (retObj.retVal == '') {
|
|
339
|
+
$XTXAlert('客户端签名失败!')
|
|
340
|
+
return
|
|
341
|
+
}
|
|
342
|
+
var objForm = retObj.ctx.objForm
|
|
343
|
+
var strAction = retObj.ctx.action
|
|
344
|
+
objForm.UserSignedData.value = retObj.retVal
|
|
345
|
+
objForm.action = strAction
|
|
346
|
+
objForm.submit()
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
function $loginVerifyServerSignatureCallBack(retObj) {
|
|
350
|
+
if (!retObj.retVal) {
|
|
351
|
+
$XTXAlert('验证服务器端信息失败!')
|
|
352
|
+
return
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
var strCertID = retObj.ctx.certID
|
|
356
|
+
SignedData(strCertID, strServerRan, $loginSignRandomCallBack, retObj.ctx)
|
|
357
|
+
}
|
|
358
|
+
function $loginCheckCertValidNotAfter(retObj) {
|
|
359
|
+
var notAfterDate = GetDateNotAfter(retObj.retVal)
|
|
360
|
+
var milliseconds = notAfterDate.getTime() - new Date().getTime()
|
|
361
|
+
if (milliseconds < 0) {
|
|
362
|
+
$XTXAlert('您的证书已过期,请尽快到北京数字证书认证中心办理证书更新手续!')
|
|
363
|
+
return
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
days = parseInt(milliseconds / (1000 * 60 * 60 * 24))
|
|
367
|
+
if (days > 0 && days <= 60) {
|
|
368
|
+
$XTXAlert('您的证书还有' + days + '天过期\n请您尽快到北京数字证书认证中心办理证书更新手续!')
|
|
369
|
+
} else if (days == 0) {
|
|
370
|
+
// 证书有效期天数小于1天
|
|
371
|
+
var hours = parseInt(milliseconds / (1000 * 60 * 60))
|
|
372
|
+
if (hours > 0) {
|
|
373
|
+
$XTXAlert('您的证书还有' + hours + '小时过期\n您尽快到北京数字证书认证中心办理证书更新手续!')
|
|
374
|
+
}
|
|
375
|
+
// 证书有效期小于1小时
|
|
376
|
+
var minutes = parseInt(milliseconds / (1000 * 60))
|
|
377
|
+
if (minutes > 1) {
|
|
378
|
+
$XTXAlert('您的证书还有' + minutes + '分钟过期\n您尽快到北京数字证书认证中心办理证书更新手续!')
|
|
379
|
+
} else {
|
|
380
|
+
$XTXAlert('您的证书已过期,请尽快到北京数字证书认证中心办理证书更新手续!')
|
|
381
|
+
return
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
VerifySignedData(strServerCert, strServerRan, strServerSignedData, $loginVerifyServerSignatureCallBack, retObj.ctx)
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
function $loginCheckCertValidNotBefore(retObj) {
|
|
389
|
+
var notBeforeDate = GetDateNotBefore(retObj.retVal)
|
|
390
|
+
var days = parseInt((notBeforeDate.getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24))
|
|
391
|
+
if (days > 0) {
|
|
392
|
+
$XTXAlert('您的证书尚未生效!距离生效日期还剩' + days + '天!')
|
|
393
|
+
return
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
var strUserCert = retObj.ctx.objForm.UserCert.value
|
|
397
|
+
GetCertBasicinfo(strUserCert, CERT_OID_NOT_AFTER, $loginCheckCertValidNotAfter, retObj.ctx)
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
function $loginGetSignCertCallBack(retObj) {
|
|
401
|
+
var strUserCert = retObj.retVal
|
|
402
|
+
if (strUserCert == '') {
|
|
403
|
+
$XTXAlert('导出用户证书失败!')
|
|
404
|
+
return
|
|
405
|
+
}
|
|
406
|
+
retObj.ctx.objForm.UserCert.value = strUserCert
|
|
407
|
+
|
|
408
|
+
GetCertBasicinfo(strUserCert, CERT_OID_NOT_BEFORE, $loginCheckCertValidNotBefore, retObj.ctx)
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
function $loginGetPINRetryCallBack(retObj) {
|
|
412
|
+
var retryCount = Number(retObj.retVal)
|
|
413
|
+
if (retryCount > 0) {
|
|
414
|
+
$XTXAlert('校验证书密码失败!您还有' + retryCount + '次机会重试!')
|
|
415
|
+
return
|
|
416
|
+
} else if (retryCount == 0) {
|
|
417
|
+
$XTXAlert('您的证书密码已被锁死,请联系BJCA进行解锁!')
|
|
418
|
+
return
|
|
419
|
+
} else {
|
|
420
|
+
$XTXAlert('登录失败!')
|
|
421
|
+
return
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function $loginVerifyPINCallBack(retObj) {
|
|
426
|
+
var strCertID = retObj.ctx.certID
|
|
427
|
+
var objForm = retObj.ctx.objForm
|
|
428
|
+
if (!retObj.retVal) {
|
|
429
|
+
GetUserPINRetryCount(strCertID, $loginGetPINRetryCallBack)
|
|
430
|
+
return
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
objForm.ContainerName.value = strCertID
|
|
434
|
+
|
|
435
|
+
GetSignCert(strCertID, $loginGetSignCertCallBack, retObj.ctx)
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function Logout(certid, cb, ctx) {
|
|
439
|
+
if ($_$CurrentObj != null && $_$CurrentObj.Logout != undefined) {
|
|
440
|
+
return $_$CurrentObj.Logout(certid, cb, ctx)
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
//Form login
|
|
445
|
+
function Login(formName, strCertID, strPin, strAction) {
|
|
446
|
+
var objForm = eval(formName)
|
|
447
|
+
if (objForm == null) {
|
|
448
|
+
$XTXAlert('表单错误!')
|
|
449
|
+
return
|
|
450
|
+
}
|
|
451
|
+
if (strCertID == null || strCertID == '') {
|
|
452
|
+
$XTXAlert('请输入证书密码!')
|
|
453
|
+
return
|
|
454
|
+
}
|
|
455
|
+
if (strPin == null || strPin == '') {
|
|
456
|
+
$XTXAlert('请输入证书密码!')
|
|
457
|
+
return
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
//Add a hidden item ...
|
|
461
|
+
var strSignItem = '<input type="hidden" name="UserSignedData" value="">'
|
|
462
|
+
if (objForm.UserSignedData == null) {
|
|
463
|
+
objForm.insertAdjacentHTML('BeforeEnd', strSignItem)
|
|
464
|
+
}
|
|
465
|
+
var strCertItem = '<input type="hidden" name="UserCert" value="">'
|
|
466
|
+
if (objForm.UserCert == null) {
|
|
467
|
+
objForm.insertAdjacentHTML('BeforeEnd', strCertItem)
|
|
468
|
+
}
|
|
469
|
+
var strContainerItem = '<input type="hidden" name="ContainerName" value="">'
|
|
470
|
+
if (objForm.ContainerName == null) {
|
|
471
|
+
objForm.insertAdjacentHTML('BeforeEnd', strContainerItem)
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
var ctx = { certID: strCertID, objForm: objForm, action: strAction }
|
|
475
|
+
|
|
476
|
+
VerifyUserPIN(strCertID, strPin, $loginVerifyPINCallBack, ctx)
|
|
477
|
+
|
|
478
|
+
return
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
function GetDeviceType(strCertID, cb, ctx) {
|
|
482
|
+
GetDeviceInfo(strCertID, 7, cb, ctx)
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
//XTXAppCOM class
|
|
486
|
+
function CreateXTXAppObject() {
|
|
487
|
+
var bOK = $LoadControl('3F367B74-92D9-4C5E-AB93-234F8A91D5E6', 'XTXAPP', 'SOF_GetVersion()', true)
|
|
488
|
+
return bOK
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
function CreateGetPicObject() {
|
|
492
|
+
var bOK = $LoadControl('3BC3C868-95B5-47ED-8686-E0E3E94EF366', 'OGetPic', 'GetPic()', false)
|
|
493
|
+
if (!bOK) {
|
|
494
|
+
return null
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
//webSocket client class
|
|
499
|
+
function CreateWebSocketObject(myonopen, myonerror) {
|
|
500
|
+
var o = new Object()
|
|
501
|
+
|
|
502
|
+
o.ws_obj = null
|
|
503
|
+
o.ws_heartbeat_id = 0
|
|
504
|
+
o.ws_queue_id = 0 // call_cmd_id
|
|
505
|
+
o.ws_queue_list = {} // call_cmd_id callback queue
|
|
506
|
+
o.ws_queue_ctx = {}
|
|
507
|
+
o.xtx_version = ''
|
|
508
|
+
|
|
509
|
+
o.load_websocket = function () {
|
|
510
|
+
var ws_url = 'wss://127.0.0.1:21061/xtxapp/'
|
|
511
|
+
ws_url = 'ws://127.0.0.1:21051/xtxapp/'
|
|
512
|
+
try {
|
|
513
|
+
o.ws_obj = new WebSocket(ws_url)
|
|
514
|
+
} catch (e) {
|
|
515
|
+
if (myonerror) {
|
|
516
|
+
myonerror()
|
|
517
|
+
}
|
|
518
|
+
if (console) {
|
|
519
|
+
console.log(e)
|
|
520
|
+
}
|
|
521
|
+
return false
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
o.ws_queue_list['onUsbkeyChange'] = $OnUsbKeyChange
|
|
525
|
+
|
|
526
|
+
o.ws_obj.onopen = function (evt) {
|
|
527
|
+
if (myonopen) {
|
|
528
|
+
myonopen()
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
o.ws_obj.onerror = function (evt) {
|
|
533
|
+
if (myonerror) {
|
|
534
|
+
myonerror()
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
o.ws_obj.onclose = function (evt) {}
|
|
539
|
+
|
|
540
|
+
o.ws_obj.onmessage = function (evt) {
|
|
541
|
+
var res = JSON.parse(evt.data)
|
|
542
|
+
if (res['set-cookie']) {
|
|
543
|
+
document.cookie = res['set-cookie']
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
//登录失败
|
|
547
|
+
if (res['loginError']) {
|
|
548
|
+
alert(res['loginError'])
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
var call_cmd_id = res['call_cmd_id']
|
|
552
|
+
if (!call_cmd_id) {
|
|
553
|
+
return
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
var execFunc = o.ws_queue_list[call_cmd_id]
|
|
557
|
+
if (typeof execFunc !== 'function') {
|
|
558
|
+
return
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
var ctx = o.ws_queue_ctx[res['call_cmd_id']]
|
|
562
|
+
ctx = ctx || { returnType: 'string' }
|
|
563
|
+
|
|
564
|
+
var ret
|
|
565
|
+
if (ctx.returnType == 'bool') {
|
|
566
|
+
ret = res.retVal == 'true'
|
|
567
|
+
} else if (ctx.returnType == 'number') {
|
|
568
|
+
ret = Number(res.retVal)
|
|
569
|
+
} else {
|
|
570
|
+
ret = res.retVal
|
|
571
|
+
}
|
|
572
|
+
var retObj = { retVal: ret, ctx: ctx }
|
|
573
|
+
|
|
574
|
+
execFunc(retObj)
|
|
575
|
+
|
|
576
|
+
if (res['call_cmd_id'] != 'onUsbkeyChange') {
|
|
577
|
+
delete o.ws_queue_list[res['call_cmd_id']]
|
|
578
|
+
}
|
|
579
|
+
delete o.ws_queue_ctx[res['call_cmd_id']]
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
return true
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
o.sendMessage = function (sendMsg) {
|
|
586
|
+
if (o.ws_obj.readyState == WebSocket.OPEN) {
|
|
587
|
+
o.ws_obj.send(JSON.stringify(sendMsg))
|
|
588
|
+
} else {
|
|
589
|
+
setTimeout(function () {
|
|
590
|
+
if (sendMsg.count) {
|
|
591
|
+
sendMsg.count++
|
|
592
|
+
if (sendMsg.count === 4) {
|
|
593
|
+
return
|
|
594
|
+
}
|
|
595
|
+
} else {
|
|
596
|
+
sendMsg.count = 1
|
|
597
|
+
}
|
|
598
|
+
o.sendMessage(sendMsg)
|
|
599
|
+
}, 500)
|
|
600
|
+
console.log("Can't connect to WebSocket server!")
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
o.callMethod = function (strMethodName, cb, ctx, returnType, argsArray) {
|
|
605
|
+
o.ws_queue_id++
|
|
606
|
+
if (typeof cb === 'function') {
|
|
607
|
+
o.ws_queue_list['i_' + o.ws_queue_id] = cb
|
|
608
|
+
ctx = ctx || {}
|
|
609
|
+
ctx.returnType = returnType
|
|
610
|
+
o.ws_queue_ctx['i_' + o.ws_queue_id] = ctx
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
var sendArray = {}
|
|
614
|
+
// sendArray['cookie'] = document.cookie;
|
|
615
|
+
sendArray['xtx_func_name'] = strMethodName
|
|
616
|
+
sendArray['call_cmd_id'] = 'i_' + o.ws_queue_id
|
|
617
|
+
|
|
618
|
+
// if (arguments.length > 4) {
|
|
619
|
+
// sendArray["param"] = argsArray;
|
|
620
|
+
// }
|
|
621
|
+
if (arguments.length > 4) {
|
|
622
|
+
for (var i = 1; i <= argsArray.length; i++) {
|
|
623
|
+
var strParam = 'param_' + i
|
|
624
|
+
sendArray[strParam] = argsArray[i - 1]
|
|
625
|
+
}
|
|
626
|
+
sendArray['param'] = argsArray
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
o.sendMessage(sendArray)
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (!o.load_websocket()) {
|
|
633
|
+
return null
|
|
634
|
+
}
|
|
635
|
+
return o
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
//Interface
|
|
639
|
+
var ComInterface = {}
|
|
640
|
+
var PicComInterface = {}
|
|
641
|
+
var WebsocketInterface = {}
|
|
642
|
+
var CurrentInterface = {}
|
|
643
|
+
|
|
644
|
+
//init_Interface
|
|
645
|
+
function init_Interface(func, altename) {
|
|
646
|
+
window[func] = function () {
|
|
647
|
+
if (CurrentInterface[func]) {
|
|
648
|
+
CurrentInterface[func].apply(this, arguments)
|
|
649
|
+
return
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
if (PicComInterface[func]) {
|
|
653
|
+
PicComInterface[func].apply(this, arguments)
|
|
654
|
+
return
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
if (altename) {
|
|
659
|
+
window[altename] = window[func]
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
//初始化
|
|
664
|
+
function init(sunccess, error) {
|
|
665
|
+
CreateGetPicObject()
|
|
666
|
+
var b = CreateXTXAppObject()
|
|
667
|
+
if (b) {
|
|
668
|
+
CurrentInterface = ComInterface
|
|
669
|
+
if (sunccess) {
|
|
670
|
+
sunccess()
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
return
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
WebsocketApp = CreateWebSocketObject(sunccess, error)
|
|
677
|
+
if (WebsocketApp) {
|
|
678
|
+
CurrentInterface = WebsocketInterface
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
//template_gen
|
|
683
|
+
ComInterface.SOF_SetSignMethod = function (SignMethod, cb, ctx) {
|
|
684
|
+
var ret = XTXAPP.SOF_SetSignMethod(SignMethod)
|
|
685
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
WebsocketInterface.SOF_SetSignMethod = function (SignMethod, cb, ctx) {
|
|
689
|
+
var paramArray = [SignMethod]
|
|
690
|
+
WebsocketApp.callMethod('SOF_SetSignMethod', cb, ctx, 'number', paramArray)
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
ComInterface.SOF_GetSignMethod = function (cb, ctx) {
|
|
694
|
+
var ret = XTXAPP.SOF_GetSignMethod()
|
|
695
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
WebsocketInterface.SOF_GetSignMethod = function (cb, ctx) {
|
|
699
|
+
var paramArray = []
|
|
700
|
+
WebsocketApp.callMethod('SOF_GetSignMethod', cb, ctx, 'number', paramArray)
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
ComInterface.SOF_SetEncryptMethod = function (EncryptMethod, cb, ctx) {
|
|
704
|
+
var ret = XTXAPP.SOF_SetEncryptMethod(EncryptMethod)
|
|
705
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
WebsocketInterface.SOF_SetEncryptMethod = function (EncryptMethod, cb, ctx) {
|
|
709
|
+
var paramArray = [EncryptMethod]
|
|
710
|
+
WebsocketApp.callMethod('SOF_SetEncryptMethod', cb, ctx, 'number', paramArray)
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
ComInterface.SOF_GetEncryptMethod = function (cb, ctx) {
|
|
714
|
+
var ret = XTXAPP.SOF_GetEncryptMethod()
|
|
715
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
WebsocketInterface.SOF_GetEncryptMethod = function (cb, ctx) {
|
|
719
|
+
var paramArray = []
|
|
720
|
+
WebsocketApp.callMethod('SOF_GetEncryptMethod', cb, ctx, 'number', paramArray)
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
ComInterface.SOF_GetUserList = function (cb, ctx) {
|
|
724
|
+
var ret = XTXAPP.SOF_GetUserList()
|
|
725
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
WebsocketInterface.SOF_GetUserList = function (cb, ctx) {
|
|
729
|
+
var paramArray = []
|
|
730
|
+
WebsocketApp.callMethod('SOF_GetUserList', cb, ctx, 'string', paramArray)
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
ComInterface.SOF_ExportUserCert = function (CertID, cb, ctx) {
|
|
734
|
+
var ret = XTXAPP.SOF_ExportUserCert(CertID)
|
|
735
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
WebsocketInterface.SOF_ExportUserCert = function (CertID, cb, ctx) {
|
|
739
|
+
var paramArray = [CertID]
|
|
740
|
+
WebsocketApp.callMethod('SOF_ExportUserCert', cb, ctx, 'string', paramArray)
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
ComInterface.SOF_Login = function (CertID, PassWd, cb, ctx) {
|
|
744
|
+
var ret = XTXAPP.SOF_Login(CertID, PassWd)
|
|
745
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
WebsocketInterface.SOF_Login = function (CertID, PassWd, cb, ctx) {
|
|
749
|
+
var paramArray = [CertID, PassWd]
|
|
750
|
+
WebsocketApp.callMethod('SOF_Login', cb, ctx, 'bool', paramArray)
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
ComInterface.SOF_GetPinRetryCount = function (CertID, cb, ctx) {
|
|
754
|
+
var ret = XTXAPP.SOF_GetPinRetryCount(CertID)
|
|
755
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
WebsocketInterface.SOF_GetPinRetryCount = function (CertID, cb, ctx) {
|
|
759
|
+
var paramArray = [CertID]
|
|
760
|
+
WebsocketApp.callMethod('SOF_GetPinRetryCount', cb, ctx, 'number', paramArray)
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
ComInterface.SOF_ChangePassWd = function (CertID, oldPass, newPass, cb, ctx) {
|
|
764
|
+
var ret = XTXAPP.SOF_ChangePassWd(CertID, oldPass, newPass)
|
|
765
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
WebsocketInterface.SOF_ChangePassWd = function (CertID, oldPass, newPass, cb, ctx) {
|
|
769
|
+
var paramArray = [CertID, oldPass, newPass]
|
|
770
|
+
WebsocketApp.callMethod('SOF_ChangePassWd', cb, ctx, 'bool', paramArray)
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
ComInterface.SOF_GetCertInfo = function (Cert, type, cb, ctx) {
|
|
774
|
+
var ret = XTXAPP.SOF_GetCertInfo(Cert, type)
|
|
775
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
WebsocketInterface.SOF_GetCertInfo = function (Cert, type, cb, ctx) {
|
|
779
|
+
var paramArray = [Cert, type]
|
|
780
|
+
WebsocketApp.callMethod('SOF_GetCertInfo', cb, ctx, 'string', paramArray)
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
ComInterface.SOF_GetCertInfoByOid = function (Cert, Oid, cb, ctx) {
|
|
784
|
+
var ret = XTXAPP.SOF_GetCertInfoByOid(Cert, Oid)
|
|
785
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
WebsocketInterface.SOF_GetCertInfoByOid = function (Cert, Oid, cb, ctx) {
|
|
789
|
+
var paramArray = [Cert, Oid]
|
|
790
|
+
WebsocketApp.callMethod('SOF_GetCertInfoByOid', cb, ctx, 'string', paramArray)
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
ComInterface.SOF_SignData = function (CertID, InData, cb, ctx) {
|
|
794
|
+
var ret = XTXAPP.SOF_SignData(CertID, InData)
|
|
795
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
WebsocketInterface.SOF_SignData = function (CertID, InData, cb, ctx) {
|
|
799
|
+
var paramArray = [CertID, InData]
|
|
800
|
+
WebsocketApp.callMethod('SOF_SignData', cb, ctx, 'string', paramArray)
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
ComInterface.SOF_VerifySignedData = function (Cert, InData, SignValue, cb, ctx) {
|
|
804
|
+
var ret = XTXAPP.SOF_VerifySignedData(Cert, InData, SignValue)
|
|
805
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
WebsocketInterface.SOF_VerifySignedData = function (Cert, InData, SignValue, cb, ctx) {
|
|
809
|
+
var paramArray = [Cert, InData, SignValue]
|
|
810
|
+
WebsocketApp.callMethod('SOF_VerifySignedData', cb, ctx, 'bool', paramArray)
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
ComInterface.SOF_SignFile = function (CertID, InFile, cb, ctx) {
|
|
814
|
+
var ret = XTXAPP.SOF_SignFile(CertID, InFile)
|
|
815
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
WebsocketInterface.SOF_SignFile = function (CertID, InFile, cb, ctx) {
|
|
819
|
+
var paramArray = [CertID, InFile]
|
|
820
|
+
WebsocketApp.callMethod('SOF_SignFile', cb, ctx, 'string', paramArray)
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
ComInterface.SOF_VerifySignedFile = function (Cert, InFile, SignValue, cb, ctx) {
|
|
824
|
+
var ret = XTXAPP.SOF_VerifySignedFile(Cert, InFile, SignValue)
|
|
825
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
WebsocketInterface.SOF_VerifySignedFile = function (Cert, InFile, SignValue, cb, ctx) {
|
|
829
|
+
var paramArray = [Cert, InFile, SignValue]
|
|
830
|
+
WebsocketApp.callMethod('SOF_VerifySignedFile', cb, ctx, 'bool', paramArray)
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
ComInterface.SOF_EncryptData = function (Cert, InData, cb, ctx) {
|
|
834
|
+
var ret = XTXAPP.SOF_EncryptData(Cert, InData)
|
|
835
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
WebsocketInterface.SOF_EncryptData = function (Cert, InData, cb, ctx) {
|
|
839
|
+
var paramArray = [Cert, InData]
|
|
840
|
+
WebsocketApp.callMethod('SOF_EncryptData', cb, ctx, 'string', paramArray)
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
ComInterface.SOF_DecryptData = function (CertID, InData, cb, ctx) {
|
|
844
|
+
var ret = XTXAPP.SOF_DecryptData(CertID, InData)
|
|
845
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
WebsocketInterface.SOF_DecryptData = function (CertID, InData, cb, ctx) {
|
|
849
|
+
var paramArray = [CertID, InData]
|
|
850
|
+
WebsocketApp.callMethod('SOF_DecryptData', cb, ctx, 'string', paramArray)
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
ComInterface.SOF_EncryptFile = function (Cert, InFile, OutFile, cb, ctx) {
|
|
854
|
+
var ret = XTXAPP.SOF_EncryptFile(Cert, InFile, OutFile)
|
|
855
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
WebsocketInterface.SOF_EncryptFile = function (Cert, InFile, OutFile, cb, ctx) {
|
|
859
|
+
var paramArray = [Cert, InFile, OutFile]
|
|
860
|
+
WebsocketApp.callMethod('SOF_EncryptFile', cb, ctx, 'bool', paramArray)
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
ComInterface.SOF_DecryptFile = function (CertID, InFile, OutFile, cb, ctx) {
|
|
864
|
+
var ret = XTXAPP.SOF_DecryptFile(CertID, InFile, OutFile)
|
|
865
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
WebsocketInterface.SOF_DecryptFile = function (CertID, InFile, OutFile, cb, ctx) {
|
|
869
|
+
var paramArray = [CertID, InFile, OutFile]
|
|
870
|
+
WebsocketApp.callMethod('SOF_DecryptFile', cb, ctx, 'bool', paramArray)
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
ComInterface.SOF_SignMessage = function (dwFlag, CertID, InData, cb, ctx) {
|
|
874
|
+
var ret = XTXAPP.SOF_SignMessage(dwFlag, CertID, InData)
|
|
875
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
WebsocketInterface.SOF_SignMessage = function (dwFlag, CertID, InData, cb, ctx) {
|
|
879
|
+
var paramArray = [dwFlag, CertID, InData]
|
|
880
|
+
WebsocketApp.callMethod('SOF_SignMessage', cb, ctx, 'string', paramArray)
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
ComInterface.SOF_VerifySignedMessage = function (MessageData, InData, cb, ctx) {
|
|
884
|
+
var ret = XTXAPP.SOF_VerifySignedMessage(MessageData, InData)
|
|
885
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
WebsocketInterface.SOF_VerifySignedMessage = function (MessageData, InData, cb, ctx) {
|
|
889
|
+
var paramArray = [MessageData, InData]
|
|
890
|
+
WebsocketApp.callMethod('SOF_VerifySignedMessage', cb, ctx, 'bool', paramArray)
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
ComInterface.SOF_GetInfoFromSignedMessage = function (SignedMessage, type, cb, ctx) {
|
|
894
|
+
var ret = XTXAPP.SOF_GetInfoFromSignedMessage(SignedMessage, type)
|
|
895
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
WebsocketInterface.SOF_GetInfoFromSignedMessage = function (SignedMessage, type, cb, ctx) {
|
|
899
|
+
var paramArray = [SignedMessage, type]
|
|
900
|
+
WebsocketApp.callMethod('SOF_GetInfoFromSignedMessage', cb, ctx, 'string', paramArray)
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
ComInterface.SOF_SignDataXML = function (CertID, InData, cb, ctx) {
|
|
904
|
+
var ret = XTXAPP.SOF_SignDataXML(CertID, InData)
|
|
905
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
WebsocketInterface.SOF_SignDataXML = function (CertID, InData, cb, ctx) {
|
|
909
|
+
var paramArray = [CertID, InData]
|
|
910
|
+
WebsocketApp.callMethod('SOF_SignDataXML', cb, ctx, 'string', paramArray)
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
ComInterface.SOF_VerifySignedDataXML = function (InData, cb, ctx) {
|
|
914
|
+
var ret = XTXAPP.SOF_VerifySignedDataXML(InData)
|
|
915
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
WebsocketInterface.SOF_VerifySignedDataXML = function (InData, cb, ctx) {
|
|
919
|
+
var paramArray = [InData]
|
|
920
|
+
WebsocketApp.callMethod('SOF_VerifySignedDataXML', cb, ctx, 'bool', paramArray)
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
ComInterface.SOF_GetXMLSignatureInfo = function (XMLSignedData, type, cb, ctx) {
|
|
924
|
+
var ret = XTXAPP.SOF_GetXMLSignatureInfo(XMLSignedData, type)
|
|
925
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
WebsocketInterface.SOF_GetXMLSignatureInfo = function (XMLSignedData, type, cb, ctx) {
|
|
929
|
+
var paramArray = [XMLSignedData, type]
|
|
930
|
+
WebsocketApp.callMethod('SOF_GetXMLSignatureInfo', cb, ctx, 'string', paramArray)
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
ComInterface.SOF_GenRandom = function (RandomLen, cb, ctx) {
|
|
934
|
+
var ret = XTXAPP.SOF_GenRandom(RandomLen)
|
|
935
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
WebsocketInterface.SOF_GenRandom = function (RandomLen, cb, ctx) {
|
|
939
|
+
var paramArray = [RandomLen]
|
|
940
|
+
WebsocketApp.callMethod('SOF_GenRandom', cb, ctx, 'string', paramArray)
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
ComInterface.SOF_PubKeyEncrypt = function (Cert, InData, cb, ctx) {
|
|
944
|
+
var ret = XTXAPP.SOF_PubKeyEncrypt(Cert, InData)
|
|
945
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
WebsocketInterface.SOF_PubKeyEncrypt = function (Cert, InData, cb, ctx) {
|
|
949
|
+
var paramArray = [Cert, InData]
|
|
950
|
+
WebsocketApp.callMethod('SOF_PubKeyEncrypt', cb, ctx, 'string', paramArray)
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
ComInterface.SOF_PriKeyDecrypt = function (CertID, InData, cb, ctx) {
|
|
954
|
+
var ret = XTXAPP.SOF_PriKeyDecrypt(CertID, InData)
|
|
955
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
WebsocketInterface.SOF_PriKeyDecrypt = function (CertID, InData, cb, ctx) {
|
|
959
|
+
var paramArray = [CertID, InData]
|
|
960
|
+
WebsocketApp.callMethod('SOF_PriKeyDecrypt', cb, ctx, 'string', paramArray)
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
ComInterface.SOF_SecertSegment = function (Secert, m, n, k, cb, ctx) {
|
|
964
|
+
var ret = XTXAPP.SOF_SecertSegment(Secert, m, n, k)
|
|
965
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
WebsocketInterface.SOF_SecertSegment = function (Secert, m, n, k, cb, ctx) {
|
|
969
|
+
var paramArray = [Secert, m, n, k]
|
|
970
|
+
WebsocketApp.callMethod('SOF_SecertSegment', cb, ctx, 'string', paramArray)
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
ComInterface.SOF_SecertRecovery = function (Seg, cb, ctx) {
|
|
974
|
+
var ret = XTXAPP.SOF_SecertRecovery(Seg)
|
|
975
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
WebsocketInterface.SOF_SecertRecovery = function (Seg, cb, ctx) {
|
|
979
|
+
var paramArray = [Seg]
|
|
980
|
+
WebsocketApp.callMethod('SOF_SecertRecovery', cb, ctx, 'string', paramArray)
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
ComInterface.SOF_GetLastError = function (cb, ctx) {
|
|
984
|
+
var ret = XTXAPP.SOF_GetLastError()
|
|
985
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
WebsocketInterface.SOF_GetLastError = function (cb, ctx) {
|
|
989
|
+
var paramArray = []
|
|
990
|
+
WebsocketApp.callMethod('SOF_GetLastError', cb, ctx, 'number', paramArray)
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
ComInterface.GetDeviceCount = function (cb, ctx) {
|
|
994
|
+
var ret = XTXAPP.GetDeviceCount()
|
|
995
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
WebsocketInterface.GetDeviceCount = function (cb, ctx) {
|
|
999
|
+
var paramArray = []
|
|
1000
|
+
WebsocketApp.callMethod('GetDeviceCount', cb, ctx, 'number', paramArray)
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
ComInterface.GetAllDeviceSN = function (cb, ctx) {
|
|
1004
|
+
var ret = XTXAPP.GetAllDeviceSN()
|
|
1005
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
WebsocketInterface.GetAllDeviceSN = function (cb, ctx) {
|
|
1009
|
+
var paramArray = []
|
|
1010
|
+
WebsocketApp.callMethod('GetAllDeviceSN', cb, ctx, 'string', paramArray)
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
ComInterface.GetDeviceSNByIndex = function (iIndex, cb, ctx) {
|
|
1014
|
+
var ret = XTXAPP.GetDeviceSNByIndex(iIndex)
|
|
1015
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
WebsocketInterface.GetDeviceSNByIndex = function (iIndex, cb, ctx) {
|
|
1019
|
+
var paramArray = [iIndex]
|
|
1020
|
+
WebsocketApp.callMethod('GetDeviceSNByIndex', cb, ctx, 'string', paramArray)
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
ComInterface.GetDeviceInfo = function (sDeviceSN, iType, cb, ctx) {
|
|
1024
|
+
var ret = XTXAPP.GetDeviceInfo(sDeviceSN, iType)
|
|
1025
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
WebsocketInterface.GetDeviceInfo = function (sDeviceSN, iType, cb, ctx) {
|
|
1029
|
+
var paramArray = [sDeviceSN, iType]
|
|
1030
|
+
WebsocketApp.callMethod('GetDeviceInfo', cb, ctx, 'string', paramArray)
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
ComInterface.ChangeAdminPass = function (sDeviceSN, sOldPass, sNewPass, cb, ctx) {
|
|
1034
|
+
var ret = XTXAPP.ChangeAdminPass(sDeviceSN, sOldPass, sNewPass)
|
|
1035
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
WebsocketInterface.ChangeAdminPass = function (sDeviceSN, sOldPass, sNewPass, cb, ctx) {
|
|
1039
|
+
var paramArray = [sDeviceSN, sOldPass, sNewPass]
|
|
1040
|
+
WebsocketApp.callMethod('ChangeAdminPass', cb, ctx, 'bool', paramArray)
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
ComInterface.UnlockUserPass = function (sDeviceSN, sAdminPass, sNewUserPass, cb, ctx) {
|
|
1044
|
+
var ret = XTXAPP.UnlockUserPass(sDeviceSN, sAdminPass, sNewUserPass)
|
|
1045
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
WebsocketInterface.UnlockUserPass = function (sDeviceSN, sAdminPass, sNewUserPass, cb, ctx) {
|
|
1049
|
+
var paramArray = [sDeviceSN, sAdminPass, sNewUserPass]
|
|
1050
|
+
WebsocketApp.callMethod('UnlockUserPass', cb, ctx, 'bool', paramArray)
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
ComInterface.GenerateKeyPair = function (sDeviceSN, sContainerName, iKeyType, bSign, cb, ctx) {
|
|
1054
|
+
var ret = XTXAPP.GenerateKeyPair(sDeviceSN, sContainerName, iKeyType, bSign)
|
|
1055
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
WebsocketInterface.GenerateKeyPair = function (sDeviceSN, sContainerName, iKeyType, bSign, cb, ctx) {
|
|
1059
|
+
var paramArray = [sDeviceSN, sContainerName, iKeyType, bSign]
|
|
1060
|
+
WebsocketApp.callMethod('GenerateKeyPair', cb, ctx, 'bool', paramArray)
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
ComInterface.ExportPubKey = function (sDeviceSN, sContainerName, bSign, cb, ctx) {
|
|
1064
|
+
var ret = XTXAPP.ExportPubKey(sDeviceSN, sContainerName, bSign)
|
|
1065
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
WebsocketInterface.ExportPubKey = function (sDeviceSN, sContainerName, bSign, cb, ctx) {
|
|
1069
|
+
var paramArray = [sDeviceSN, sContainerName, bSign]
|
|
1070
|
+
WebsocketApp.callMethod('ExportPubKey', cb, ctx, 'string', paramArray)
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
ComInterface.ImportSignCert = function (sDeviceSN, sContainerName, sCert, cb, ctx) {
|
|
1074
|
+
var ret = XTXAPP.ImportSignCert(sDeviceSN, sContainerName, sCert)
|
|
1075
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
WebsocketInterface.ImportSignCert = function (sDeviceSN, sContainerName, sCert, cb, ctx) {
|
|
1079
|
+
var paramArray = [sDeviceSN, sContainerName, sCert]
|
|
1080
|
+
WebsocketApp.callMethod('ImportSignCert', cb, ctx, 'bool', paramArray)
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
ComInterface.ImportEncCert = function (sDeviceSN, sContainerName, sCert, sPriKeyCipher, cb, ctx) {
|
|
1084
|
+
var ret = XTXAPP.ImportEncCert(sDeviceSN, sContainerName, sCert, sPriKeyCipher)
|
|
1085
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
WebsocketInterface.ImportEncCert = function (sDeviceSN, sContainerName, sCert, sPriKeyCipher, cb, ctx) {
|
|
1089
|
+
var paramArray = [sDeviceSN, sContainerName, sCert, sPriKeyCipher]
|
|
1090
|
+
WebsocketApp.callMethod('ImportEncCert', cb, ctx, 'bool', paramArray)
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
ComInterface.ReadFile = function (sDeviceSN, sFileName, cb, ctx) {
|
|
1094
|
+
var ret = XTXAPP.ReadFile(sDeviceSN, sFileName)
|
|
1095
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
WebsocketInterface.ReadFile = function (sDeviceSN, sFileName, cb, ctx) {
|
|
1099
|
+
var paramArray = [sDeviceSN, sFileName]
|
|
1100
|
+
WebsocketApp.callMethod('ReadFile', cb, ctx, 'string', paramArray)
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
ComInterface.WriteFile = function (sDeviceSN, sFileName, sContent, bPrivate, cb, ctx) {
|
|
1104
|
+
var ret = XTXAPP.WriteFile(sDeviceSN, sFileName, sContent, bPrivate)
|
|
1105
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
WebsocketInterface.WriteFile = function (sDeviceSN, sFileName, sContent, bPrivate, cb, ctx) {
|
|
1109
|
+
var paramArray = [sDeviceSN, sFileName, sContent, bPrivate]
|
|
1110
|
+
WebsocketApp.callMethod('WriteFile', cb, ctx, 'bool', paramArray)
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
ComInterface.IsContainerExist = function (sDeviceSN, sContainerName, cb, ctx) {
|
|
1114
|
+
var ret = XTXAPP.IsContainerExist(sDeviceSN, sContainerName)
|
|
1115
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
WebsocketInterface.IsContainerExist = function (sDeviceSN, sContainerName, cb, ctx) {
|
|
1119
|
+
var paramArray = [sDeviceSN, sContainerName]
|
|
1120
|
+
WebsocketApp.callMethod('IsContainerExist', cb, ctx, 'bool', paramArray)
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
ComInterface.DeleteContainer = function (sDeviceSN, sContainerName, cb, ctx) {
|
|
1124
|
+
var ret = XTXAPP.DeleteContainer(sDeviceSN, sContainerName)
|
|
1125
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
WebsocketInterface.DeleteContainer = function (sDeviceSN, sContainerName, cb, ctx) {
|
|
1129
|
+
var paramArray = [sDeviceSN, sContainerName]
|
|
1130
|
+
WebsocketApp.callMethod('DeleteContainer', cb, ctx, 'bool', paramArray)
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
ComInterface.ExportPKCS10 = function (sDeviceSN, sContainerName, sDN, bSign, cb, ctx) {
|
|
1134
|
+
var ret = XTXAPP.ExportPKCS10(sDeviceSN, sContainerName, sDN, bSign)
|
|
1135
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
WebsocketInterface.ExportPKCS10 = function (sDeviceSN, sContainerName, sDN, bSign, cb, ctx) {
|
|
1139
|
+
var paramArray = [sDeviceSN, sContainerName, sDN, bSign]
|
|
1140
|
+
WebsocketApp.callMethod('ExportPKCS10', cb, ctx, 'string', paramArray)
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
ComInterface.InitDevice = function (sDeviceSN, sAdminPass, cb, ctx) {
|
|
1144
|
+
var ret = XTXAPP.InitDevice(sDeviceSN, sAdminPass)
|
|
1145
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
WebsocketInterface.InitDevice = function (sDeviceSN, sAdminPass, cb, ctx) {
|
|
1149
|
+
var paramArray = [sDeviceSN, sAdminPass]
|
|
1150
|
+
WebsocketApp.callMethod('InitDevice', cb, ctx, 'bool', paramArray)
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
ComInterface.CertListFormElement = function (cb, ctx) {
|
|
1154
|
+
var ret = XTXAPP.CertListFormElement()
|
|
1155
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
WebsocketInterface.CertListFormElement = function (cb, ctx) {
|
|
1159
|
+
var paramArray = []
|
|
1160
|
+
WebsocketApp.callMethod('CertListFormElement', cb, ctx, 'string', paramArray)
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
ComInterface.CertListFormElement = function (newVal, cb, ctx) {
|
|
1164
|
+
var ret = XTXAPP.CertListFormElement(newVal)
|
|
1165
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
WebsocketInterface.CertListFormElement = function (newVal, cb, ctx) {
|
|
1169
|
+
var paramArray = [newVal]
|
|
1170
|
+
WebsocketApp.callMethod('CertListFormElement', cb, ctx, 'string', paramArray)
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
ComInterface.AlertBeforeCertDate = function (cb, ctx) {
|
|
1174
|
+
var ret = XTXAPP.AlertBeforeCertDate()
|
|
1175
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
WebsocketInterface.AlertBeforeCertDate = function (cb, ctx) {
|
|
1179
|
+
var paramArray = []
|
|
1180
|
+
WebsocketApp.callMethod('AlertBeforeCertDate', cb, ctx, 'string', paramArray)
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
ComInterface.AlertBeforeCertDate = function (newVal, cb, ctx) {
|
|
1184
|
+
var ret = XTXAPP.AlertBeforeCertDate(newVal)
|
|
1185
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
WebsocketInterface.AlertBeforeCertDate = function (newVal, cb, ctx) {
|
|
1189
|
+
var paramArray = [newVal]
|
|
1190
|
+
WebsocketApp.callMethod('AlertBeforeCertDate', cb, ctx, 'string', paramArray)
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
ComInterface.ServerSignedData = function (cb, ctx) {
|
|
1194
|
+
var ret = XTXAPP.ServerSignedData()
|
|
1195
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
WebsocketInterface.ServerSignedData = function (cb, ctx) {
|
|
1199
|
+
var paramArray = []
|
|
1200
|
+
WebsocketApp.callMethod('ServerSignedData', cb, ctx, 'string', paramArray)
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
ComInterface.ServerSignedData = function (newVal, cb, ctx) {
|
|
1204
|
+
var ret = XTXAPP.ServerSignedData(newVal)
|
|
1205
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
WebsocketInterface.ServerSignedData = function (newVal, cb, ctx) {
|
|
1209
|
+
var paramArray = [newVal]
|
|
1210
|
+
WebsocketApp.callMethod('ServerSignedData', cb, ctx, 'string', paramArray)
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
ComInterface.ServerRan = function (cb, ctx) {
|
|
1214
|
+
var ret = XTXAPP.ServerRan()
|
|
1215
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
WebsocketInterface.ServerRan = function (cb, ctx) {
|
|
1219
|
+
var paramArray = []
|
|
1220
|
+
WebsocketApp.callMethod('ServerRan', cb, ctx, 'string', paramArray)
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
ComInterface.ServerRan = function (newVal, cb, ctx) {
|
|
1224
|
+
var ret = XTXAPP.ServerRan(newVal)
|
|
1225
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
WebsocketInterface.ServerRan = function (newVal, cb, ctx) {
|
|
1229
|
+
var paramArray = [newVal]
|
|
1230
|
+
WebsocketApp.callMethod('ServerRan', cb, ctx, 'string', paramArray)
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
ComInterface.ServerCert = function (cb, ctx) {
|
|
1234
|
+
var ret = XTXAPP.ServerCert()
|
|
1235
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
WebsocketInterface.ServerCert = function (cb, ctx) {
|
|
1239
|
+
var paramArray = []
|
|
1240
|
+
WebsocketApp.callMethod('ServerCert', cb, ctx, 'string', paramArray)
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
ComInterface.ServerCert = function (newVal, cb, ctx) {
|
|
1244
|
+
var ret = XTXAPP.ServerCert(newVal)
|
|
1245
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
WebsocketInterface.ServerCert = function (newVal, cb, ctx) {
|
|
1249
|
+
var paramArray = [newVal]
|
|
1250
|
+
WebsocketApp.callMethod('ServerCert', cb, ctx, 'string', paramArray)
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
ComInterface.ServerMode = function (cb, ctx) {
|
|
1254
|
+
var ret = XTXAPP.ServerMode()
|
|
1255
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
WebsocketInterface.ServerMode = function (cb, ctx) {
|
|
1259
|
+
var paramArray = []
|
|
1260
|
+
WebsocketApp.callMethod('ServerMode', cb, ctx, 'string', paramArray)
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
ComInterface.ServerMode = function (newVal, cb, ctx) {
|
|
1264
|
+
var ret = XTXAPP.ServerMode(newVal)
|
|
1265
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
WebsocketInterface.ServerMode = function (newVal, cb, ctx) {
|
|
1269
|
+
var paramArray = [newVal]
|
|
1270
|
+
WebsocketApp.callMethod('ServerMode', cb, ctx, 'string', paramArray)
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
ComInterface.ShowError = function (cb, ctx) {
|
|
1274
|
+
var ret = XTXAPP.ShowError()
|
|
1275
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
WebsocketInterface.ShowError = function (cb, ctx) {
|
|
1279
|
+
var paramArray = []
|
|
1280
|
+
WebsocketApp.callMethod('ShowError', cb, ctx, 'string', paramArray)
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
ComInterface.ShowError = function (newVal, cb, ctx) {
|
|
1284
|
+
var ret = XTXAPP.ShowError(newVal)
|
|
1285
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
WebsocketInterface.ShowError = function (newVal, cb, ctx) {
|
|
1289
|
+
var paramArray = [newVal]
|
|
1290
|
+
WebsocketApp.callMethod('ShowError', cb, ctx, 'string', paramArray)
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
ComInterface.AddSignInfo = function (sUserPass, cb, ctx) {
|
|
1294
|
+
var ret = XTXAPP.AddSignInfo(sUserPass)
|
|
1295
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
WebsocketInterface.AddSignInfo = function (sUserPass, cb, ctx) {
|
|
1299
|
+
var paramArray = [sUserPass]
|
|
1300
|
+
WebsocketApp.callMethod('AddSignInfo', cb, ctx, 'bool', paramArray)
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
ComInterface.SOF_GetVersion = function (cb, ctx) {
|
|
1304
|
+
var ret = XTXAPP.SOF_GetVersion()
|
|
1305
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
WebsocketInterface.SOF_GetVersion = function (cb, ctx) {
|
|
1309
|
+
var paramArray = []
|
|
1310
|
+
WebsocketApp.callMethod('SOF_GetVersion', cb, ctx, 'string', paramArray)
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
ComInterface.SOF_ExportExChangeUserCert = function (CertID, cb, ctx) {
|
|
1314
|
+
var ret = XTXAPP.SOF_ExportExChangeUserCert(CertID)
|
|
1315
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
WebsocketInterface.SOF_ExportExChangeUserCert = function (CertID, cb, ctx) {
|
|
1319
|
+
var paramArray = [CertID]
|
|
1320
|
+
WebsocketApp.callMethod('SOF_ExportExChangeUserCert', cb, ctx, 'string', paramArray)
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
ComInterface.SOF_ValidateCert = function (Cert, cb, ctx) {
|
|
1324
|
+
var ret = XTXAPP.SOF_ValidateCert(Cert)
|
|
1325
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
WebsocketInterface.SOF_ValidateCert = function (Cert, cb, ctx) {
|
|
1329
|
+
var paramArray = [Cert]
|
|
1330
|
+
WebsocketApp.callMethod('SOF_ValidateCert', cb, ctx, 'number', paramArray)
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
ComInterface.GetENVSN = function (sDeviceSN, cb, ctx) {
|
|
1334
|
+
var ret = XTXAPP.GetENVSN(sDeviceSN)
|
|
1335
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
WebsocketInterface.GetENVSN = function (sDeviceSN, cb, ctx) {
|
|
1339
|
+
var paramArray = [sDeviceSN]
|
|
1340
|
+
WebsocketApp.callMethod('GetENVSN', cb, ctx, 'string', paramArray)
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
ComInterface.SetENVSN = function (sDeviceSN, sEnvsn, cb, ctx) {
|
|
1344
|
+
var ret = XTXAPP.SetENVSN(sDeviceSN, sEnvsn)
|
|
1345
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
WebsocketInterface.SetENVSN = function (sDeviceSN, sEnvsn, cb, ctx) {
|
|
1349
|
+
var paramArray = [sDeviceSN, sEnvsn]
|
|
1350
|
+
WebsocketApp.callMethod('SetENVSN', cb, ctx, 'bool', paramArray)
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
ComInterface.IsDeviceExist = function (sDeviceSN, cb, ctx) {
|
|
1354
|
+
var ret = XTXAPP.IsDeviceExist(sDeviceSN)
|
|
1355
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
WebsocketInterface.IsDeviceExist = function (sDeviceSN, cb, ctx) {
|
|
1359
|
+
var paramArray = [sDeviceSN]
|
|
1360
|
+
WebsocketApp.callMethod('IsDeviceExist', cb, ctx, 'bool', paramArray)
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
ComInterface.GetContainerCount = function (sDeviceSN, cb, ctx) {
|
|
1364
|
+
var ret = XTXAPP.GetContainerCount(sDeviceSN)
|
|
1365
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
WebsocketInterface.GetContainerCount = function (sDeviceSN, cb, ctx) {
|
|
1369
|
+
var paramArray = [sDeviceSN]
|
|
1370
|
+
WebsocketApp.callMethod('GetContainerCount', cb, ctx, 'number', paramArray)
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
ComInterface.SOF_SymEncryptData = function (sKey, indata, cb, ctx) {
|
|
1374
|
+
var ret = XTXAPP.SOF_SymEncryptData(sKey, indata)
|
|
1375
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
WebsocketInterface.SOF_SymEncryptData = function (sKey, indata, cb, ctx) {
|
|
1379
|
+
var paramArray = [sKey, indata]
|
|
1380
|
+
WebsocketApp.callMethod('SOF_SymEncryptData', cb, ctx, 'string', paramArray)
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
ComInterface.SOF_SymDecryptData = function (sKey, indata, cb, ctx) {
|
|
1384
|
+
var ret = XTXAPP.SOF_SymDecryptData(sKey, indata)
|
|
1385
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
WebsocketInterface.SOF_SymDecryptData = function (sKey, indata, cb, ctx) {
|
|
1389
|
+
var paramArray = [sKey, indata]
|
|
1390
|
+
WebsocketApp.callMethod('SOF_SymDecryptData', cb, ctx, 'string', paramArray)
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
ComInterface.SOF_SymEncryptFile = function (sKey, inFile, outFile, cb, ctx) {
|
|
1394
|
+
var ret = XTXAPP.SOF_SymEncryptFile(sKey, inFile, outFile)
|
|
1395
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
WebsocketInterface.SOF_SymEncryptFile = function (sKey, inFile, outFile, cb, ctx) {
|
|
1399
|
+
var paramArray = [sKey, inFile, outFile]
|
|
1400
|
+
WebsocketApp.callMethod('SOF_SymEncryptFile', cb, ctx, 'bool', paramArray)
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
ComInterface.SOF_SymDecryptFile = function (sKey, inFile, outFile, cb, ctx) {
|
|
1404
|
+
var ret = XTXAPP.SOF_SymDecryptFile(sKey, inFile, outFile)
|
|
1405
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
WebsocketInterface.SOF_SymDecryptFile = function (sKey, inFile, outFile, cb, ctx) {
|
|
1409
|
+
var paramArray = [sKey, inFile, outFile]
|
|
1410
|
+
WebsocketApp.callMethod('SOF_SymDecryptFile', cb, ctx, 'bool', paramArray)
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
ComInterface.SOF_GetLastErrMsg = function (cb, ctx) {
|
|
1414
|
+
var ret = XTXAPP.SOF_GetLastErrMsg()
|
|
1415
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
WebsocketInterface.SOF_GetLastErrMsg = function (cb, ctx) {
|
|
1419
|
+
var paramArray = []
|
|
1420
|
+
WebsocketApp.callMethod('SOF_GetLastErrMsg', cb, ctx, 'string', paramArray)
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
ComInterface.SOF_Base64Encode = function (sIndata, cb, ctx) {
|
|
1424
|
+
var ret = XTXAPP.SOF_Base64Encode(sIndata)
|
|
1425
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
WebsocketInterface.SOF_Base64Encode = function (sIndata, cb, ctx) {
|
|
1429
|
+
var paramArray = [sIndata]
|
|
1430
|
+
WebsocketApp.callMethod('SOF_Base64Encode', cb, ctx, 'string', paramArray)
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
ComInterface.SOF_Base64Decode = function (sIndata, cb, ctx) {
|
|
1434
|
+
var ret = XTXAPP.SOF_Base64Decode(sIndata)
|
|
1435
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
WebsocketInterface.SOF_Base64Decode = function (sIndata, cb, ctx) {
|
|
1439
|
+
var paramArray = [sIndata]
|
|
1440
|
+
WebsocketApp.callMethod('SOF_Base64Decode', cb, ctx, 'string', paramArray)
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
ComInterface.SOF_HashData = function (hashAlg, sInData, cb, ctx) {
|
|
1444
|
+
var ret = XTXAPP.SOF_HashData(hashAlg, sInData)
|
|
1445
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
WebsocketInterface.SOF_HashData = function (hashAlg, sInData, cb, ctx) {
|
|
1449
|
+
var paramArray = [hashAlg, sInData]
|
|
1450
|
+
WebsocketApp.callMethod('SOF_HashData', cb, ctx, 'string', paramArray)
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
ComInterface.SOF_HashFile = function (hashAlg, inFile, cb, ctx) {
|
|
1454
|
+
var ret = XTXAPP.SOF_HashFile(hashAlg, inFile)
|
|
1455
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
WebsocketInterface.SOF_HashFile = function (hashAlg, inFile, cb, ctx) {
|
|
1459
|
+
var paramArray = [hashAlg, inFile]
|
|
1460
|
+
WebsocketApp.callMethod('SOF_HashFile', cb, ctx, 'string', paramArray)
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
ComInterface.UnlockUserPassEx = function (sDeviceSN, sAdminPin, sNewUserPass, cb, ctx) {
|
|
1464
|
+
var ret = XTXAPP.UnlockUserPassEx(sDeviceSN, sAdminPin, sNewUserPass)
|
|
1465
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
WebsocketInterface.UnlockUserPassEx = function (sDeviceSN, sAdminPin, sNewUserPass, cb, ctx) {
|
|
1469
|
+
var paramArray = [sDeviceSN, sAdminPin, sNewUserPass]
|
|
1470
|
+
WebsocketApp.callMethod('UnlockUserPassEx', cb, ctx, 'bool', paramArray)
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
ComInterface.DeleteOldContainer = function (sDeviceSN, cb, ctx) {
|
|
1474
|
+
var ret = XTXAPP.DeleteOldContainer(sDeviceSN)
|
|
1475
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
WebsocketInterface.DeleteOldContainer = function (sDeviceSN, cb, ctx) {
|
|
1479
|
+
var paramArray = [sDeviceSN]
|
|
1480
|
+
WebsocketApp.callMethod('DeleteOldContainer', cb, ctx, 'bool', paramArray)
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
ComInterface.WriteFileEx = function (sDeviceSN, sFileName, sContent, cb, ctx) {
|
|
1484
|
+
var ret = XTXAPP.WriteFileEx(sDeviceSN, sFileName, sContent)
|
|
1485
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
WebsocketInterface.WriteFileEx = function (sDeviceSN, sFileName, sContent, cb, ctx) {
|
|
1489
|
+
var paramArray = [sDeviceSN, sFileName, sContent]
|
|
1490
|
+
WebsocketApp.callMethod('WriteFileEx', cb, ctx, 'bool', paramArray)
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
ComInterface.ReadFileEx = function (sDeviceSN, sFileName, cb, ctx) {
|
|
1494
|
+
var ret = XTXAPP.ReadFileEx(sDeviceSN, sFileName)
|
|
1495
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
WebsocketInterface.ReadFileEx = function (sDeviceSN, sFileName, cb, ctx) {
|
|
1499
|
+
var paramArray = [sDeviceSN, sFileName]
|
|
1500
|
+
WebsocketApp.callMethod('ReadFileEx', cb, ctx, 'string', paramArray)
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
ComInterface.SOF_EncryptDataEx = function (Cert, InData, cb, ctx) {
|
|
1504
|
+
var ret = XTXAPP.SOF_EncryptDataEx(Cert, InData)
|
|
1505
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
WebsocketInterface.SOF_EncryptDataEx = function (Cert, InData, cb, ctx) {
|
|
1509
|
+
var paramArray = [Cert, InData]
|
|
1510
|
+
WebsocketApp.callMethod('SOF_EncryptDataEx', cb, ctx, 'string', paramArray)
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
ComInterface.Base64EncodeFile = function (sInFile, cb, ctx) {
|
|
1514
|
+
var ret = XTXAPP.Base64EncodeFile(sInFile)
|
|
1515
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
WebsocketInterface.Base64EncodeFile = function (sInFile, cb, ctx) {
|
|
1519
|
+
var paramArray = [sInFile]
|
|
1520
|
+
WebsocketApp.callMethod('Base64EncodeFile', cb, ctx, 'string', paramArray)
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
ComInterface.SOF_GetRetryCount = function (CertID, cb, ctx) {
|
|
1524
|
+
var ret = XTXAPP.SOF_GetRetryCount(CertID)
|
|
1525
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
WebsocketInterface.SOF_GetRetryCount = function (CertID, cb, ctx) {
|
|
1529
|
+
var paramArray = [CertID]
|
|
1530
|
+
WebsocketApp.callMethod('SOF_GetRetryCount', cb, ctx, 'number', paramArray)
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
ComInterface.SOF_GetAllContainerName = function (sDeviceSN, cb, ctx) {
|
|
1534
|
+
var ret = XTXAPP.SOF_GetAllContainerName(sDeviceSN)
|
|
1535
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
WebsocketInterface.SOF_GetAllContainerName = function (sDeviceSN, cb, ctx) {
|
|
1539
|
+
var paramArray = [sDeviceSN]
|
|
1540
|
+
WebsocketApp.callMethod('SOF_GetAllContainerName', cb, ctx, 'string', paramArray)
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
ComInterface.CreateSoftDevice = function (sDeviceSN, sLabel, cb, ctx) {
|
|
1544
|
+
var ret = XTXAPP.CreateSoftDevice(sDeviceSN, sLabel)
|
|
1545
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
WebsocketInterface.CreateSoftDevice = function (sDeviceSN, sLabel, cb, ctx) {
|
|
1549
|
+
var paramArray = [sDeviceSN, sLabel]
|
|
1550
|
+
WebsocketApp.callMethod('CreateSoftDevice', cb, ctx, 'bool', paramArray)
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
ComInterface.DeleteSoftDevice = function (sDeviceSN, sPasswd, cb, ctx) {
|
|
1554
|
+
var ret = XTXAPP.DeleteSoftDevice(sDeviceSN, sPasswd)
|
|
1555
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
WebsocketInterface.DeleteSoftDevice = function (sDeviceSN, sPasswd, cb, ctx) {
|
|
1559
|
+
var paramArray = [sDeviceSN, sPasswd]
|
|
1560
|
+
WebsocketApp.callMethod('DeleteSoftDevice', cb, ctx, 'bool', paramArray)
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
ComInterface.EnableSoftDevice = function (enable, sDeviceSN, cb, ctx) {
|
|
1564
|
+
var ret = XTXAPP.EnableSoftDevice(enable, sDeviceSN)
|
|
1565
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
WebsocketInterface.EnableSoftDevice = function (enable, sDeviceSN, cb, ctx) {
|
|
1569
|
+
var paramArray = [enable, sDeviceSN]
|
|
1570
|
+
WebsocketApp.callMethod('EnableSoftDevice', cb, ctx, 'bool', paramArray)
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
ComInterface.SoftDeviceBackup = function (sDeviceSN, sPasswd, cb, ctx) {
|
|
1574
|
+
var ret = XTXAPP.SoftDeviceBackup(sDeviceSN, sPasswd)
|
|
1575
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
WebsocketInterface.SoftDeviceBackup = function (sDeviceSN, sPasswd, cb, ctx) {
|
|
1579
|
+
var paramArray = [sDeviceSN, sPasswd]
|
|
1580
|
+
WebsocketApp.callMethod('SoftDeviceBackup', cb, ctx, 'string', paramArray)
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
ComInterface.SoftDeviceRestore = function (sDeviceSN, sPasswd, sInFilePath, cb, ctx) {
|
|
1584
|
+
var ret = XTXAPP.SoftDeviceRestore(sDeviceSN, sPasswd, sInFilePath)
|
|
1585
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
WebsocketInterface.SoftDeviceRestore = function (sDeviceSN, sPasswd, sInFilePath, cb, ctx) {
|
|
1589
|
+
var paramArray = [sDeviceSN, sPasswd, sInFilePath]
|
|
1590
|
+
WebsocketApp.callMethod('SoftDeviceRestore', cb, ctx, 'bool', paramArray)
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
ComInterface.SOF_Logout = function (CertID, cb, ctx) {
|
|
1594
|
+
var ret = XTXAPP.SOF_Logout(CertID)
|
|
1595
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
WebsocketInterface.SOF_Logout = function (CertID, cb, ctx) {
|
|
1599
|
+
var paramArray = [CertID]
|
|
1600
|
+
WebsocketApp.callMethod('SOF_Logout', cb, ctx, 'bool', paramArray)
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
ComInterface.SetUserConfig = function (type, strConfig, cb, ctx) {
|
|
1604
|
+
var ret = XTXAPP.SetUserConfig(type, strConfig)
|
|
1605
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
WebsocketInterface.SetUserConfig = function (type, strConfig, cb, ctx) {
|
|
1609
|
+
var paramArray = [type, strConfig]
|
|
1610
|
+
WebsocketApp.callMethod('SetUserConfig', cb, ctx, 'bool', paramArray)
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
ComInterface.SOF_SignByteData = function (CertID, byteLen, cb, ctx) {
|
|
1614
|
+
var ret = XTXAPP.SOF_SignByteData(CertID, byteLen)
|
|
1615
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
WebsocketInterface.SOF_SignByteData = function (CertID, byteLen, cb, ctx) {
|
|
1619
|
+
var paramArray = [CertID, byteLen]
|
|
1620
|
+
WebsocketApp.callMethod('SOF_SignByteData', cb, ctx, 'string', paramArray)
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
ComInterface.SOF_VerifySignedByteData = function (Cert, byteLen, SignValue, cb, ctx) {
|
|
1624
|
+
var ret = XTXAPP.SOF_VerifySignedByteData(Cert, byteLen, SignValue)
|
|
1625
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
WebsocketInterface.SOF_VerifySignedByteData = function (Cert, byteLen, SignValue, cb, ctx) {
|
|
1629
|
+
var paramArray = [Cert, byteLen, SignValue]
|
|
1630
|
+
WebsocketApp.callMethod('SOF_VerifySignedByteData', cb, ctx, 'bool', paramArray)
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
ComInterface.OTP_GetChallengeCode = function (sCertID, cb, ctx) {
|
|
1634
|
+
var ret = XTXAPP.OTP_GetChallengeCode(sCertID)
|
|
1635
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
WebsocketInterface.OTP_GetChallengeCode = function (sCertID, cb, ctx) {
|
|
1639
|
+
var paramArray = [sCertID]
|
|
1640
|
+
WebsocketApp.callMethod('OTP_GetChallengeCode', cb, ctx, 'string', paramArray)
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
ComInterface.ImportEncCertEx = function (sDeviceSN, sContainerName, sCert, sPriKeyCipher, ulSymAlg, cb, ctx) {
|
|
1644
|
+
var ret = XTXAPP.ImportEncCertEx(sDeviceSN, sContainerName, sCert, sPriKeyCipher, ulSymAlg)
|
|
1645
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
WebsocketInterface.ImportEncCertEx = function (sDeviceSN, sContainerName, sCert, sPriKeyCipher, ulSymAlg, cb, ctx) {
|
|
1649
|
+
var paramArray = [sDeviceSN, sContainerName, sCert, sPriKeyCipher, ulSymAlg]
|
|
1650
|
+
WebsocketApp.callMethod('ImportEncCertEx', cb, ctx, 'bool', paramArray)
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
ComInterface.SOF_GetCertEntity = function (sCert, cb, ctx) {
|
|
1654
|
+
var ret = XTXAPP.SOF_GetCertEntity(sCert)
|
|
1655
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
WebsocketInterface.SOF_GetCertEntity = function (sCert, cb, ctx) {
|
|
1659
|
+
var paramArray = [sCert]
|
|
1660
|
+
WebsocketApp.callMethod('SOF_GetCertEntity', cb, ctx, 'string', paramArray)
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
ComInterface.SOF_HMAC = function (hashid, key, indata, cb, ctx) {
|
|
1664
|
+
var ret = XTXAPP.SOF_HMAC(hashid, key, indata)
|
|
1665
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
WebsocketInterface.SOF_HMAC = function (hashid, key, indata, cb, ctx) {
|
|
1669
|
+
var paramArray = [hashid, key, indata]
|
|
1670
|
+
WebsocketApp.callMethod('SOF_HMAC', cb, ctx, 'string', paramArray)
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
ComInterface.SOF_SignDataByPriKey = function (sPriKey, sCert, sInData, cb, ctx) {
|
|
1674
|
+
var ret = XTXAPP.SOF_SignDataByPriKey(sPriKey, sCert, sInData)
|
|
1675
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
WebsocketInterface.SOF_SignDataByPriKey = function (sPriKey, sCert, sInData, cb, ctx) {
|
|
1679
|
+
var paramArray = [sPriKey, sCert, sInData]
|
|
1680
|
+
WebsocketApp.callMethod('SOF_SignDataByPriKey', cb, ctx, 'string', paramArray)
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
ComInterface.ImportKeyCertToSoftDevice = function (sDeviceSN, sContainerName, sPriKey, sCert, bSign, cb, ctx) {
|
|
1684
|
+
var ret = XTXAPP.ImportKeyCertToSoftDevice(sDeviceSN, sContainerName, sPriKey, sCert, bSign)
|
|
1685
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
WebsocketInterface.ImportKeyCertToSoftDevice = function (sDeviceSN, sContainerName, sPriKey, sCert, bSign, cb, ctx) {
|
|
1689
|
+
var paramArray = [sDeviceSN, sContainerName, sPriKey, sCert, bSign]
|
|
1690
|
+
WebsocketApp.callMethod('ImportKeyCertToSoftDevice', cb, ctx, 'bool', paramArray)
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
ComInterface.InitDeviceEx = function (
|
|
1694
|
+
sDeviceSN,
|
|
1695
|
+
sAdminPass,
|
|
1696
|
+
sUserPin,
|
|
1697
|
+
sKeyLabel,
|
|
1698
|
+
adminPinMaxRetry,
|
|
1699
|
+
userPinMaxRetry,
|
|
1700
|
+
cb,
|
|
1701
|
+
ctx
|
|
1702
|
+
) {
|
|
1703
|
+
var ret = XTXAPP.InitDeviceEx(sDeviceSN, sAdminPass, sUserPin, sKeyLabel, adminPinMaxRetry, userPinMaxRetry)
|
|
1704
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
WebsocketInterface.InitDeviceEx = function (
|
|
1708
|
+
sDeviceSN,
|
|
1709
|
+
sAdminPass,
|
|
1710
|
+
sUserPin,
|
|
1711
|
+
sKeyLabel,
|
|
1712
|
+
adminPinMaxRetry,
|
|
1713
|
+
userPinMaxRetry,
|
|
1714
|
+
cb,
|
|
1715
|
+
ctx
|
|
1716
|
+
) {
|
|
1717
|
+
var paramArray = [sDeviceSN, sAdminPass, sUserPin, sKeyLabel, adminPinMaxRetry, userPinMaxRetry]
|
|
1718
|
+
WebsocketApp.callMethod('InitDeviceEx', cb, ctx, 'bool', paramArray)
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
ComInterface.SelectFile = function (cb, ctx) {
|
|
1722
|
+
var ret = XTXAPP.SelectFile()
|
|
1723
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
WebsocketInterface.SelectFile = function (cb, ctx) {
|
|
1727
|
+
var paramArray = []
|
|
1728
|
+
WebsocketApp.callMethod('SelectFile', cb, ctx, 'string', paramArray)
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
ComInterface.SOF_SignHashData = function (CertID, b64ashData, hashAlg, cb, ctx) {
|
|
1732
|
+
var ret = XTXAPP.SOF_SignHashData(CertID, b64ashData, hashAlg)
|
|
1733
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
WebsocketInterface.SOF_SignHashData = function (CertID, b64ashData, hashAlg, cb, ctx) {
|
|
1737
|
+
var paramArray = [CertID, b64ashData, hashAlg]
|
|
1738
|
+
WebsocketApp.callMethod('SOF_SignHashData', cb, ctx, 'string', paramArray)
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
ComInterface.SOF_VerifySignedHashData = function (Cert, b64ashData, SignValue, hashAlg, cb, ctx) {
|
|
1742
|
+
var ret = XTXAPP.SOF_VerifySignedHashData(Cert, b64ashData, SignValue, hashAlg)
|
|
1743
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
WebsocketInterface.SOF_VerifySignedHashData = function (Cert, b64ashData, SignValue, hashAlg, cb, ctx) {
|
|
1747
|
+
var paramArray = [Cert, b64ashData, SignValue, hashAlg]
|
|
1748
|
+
WebsocketApp.callMethod('SOF_VerifySignedHashData', cb, ctx, 'bool', paramArray)
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
ComInterface.CheckSoftDeviceEnv = function (cb, ctx) {
|
|
1752
|
+
var ret = XTXAPP.CheckSoftDeviceEnv()
|
|
1753
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
WebsocketInterface.CheckSoftDeviceEnv = function (cb, ctx) {
|
|
1757
|
+
var paramArray = []
|
|
1758
|
+
WebsocketApp.callMethod('CheckSoftDeviceEnv', cb, ctx, 'bool', paramArray)
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
ComInterface.SOF_SignBinaryData = function (CertID, cb, ctx) {
|
|
1762
|
+
var ret = XTXAPP.SOF_SignBinaryData(CertID)
|
|
1763
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
WebsocketInterface.SOF_SignBinaryData = function (CertID, cb, ctx) {
|
|
1767
|
+
var paramArray = [CertID]
|
|
1768
|
+
WebsocketApp.callMethod('SOF_SignBinaryData', cb, ctx, 'string', paramArray)
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
ComInterface.SOF_VerifySignedBinaryData = function (Cert, SignValue, cb, ctx) {
|
|
1772
|
+
var ret = XTXAPP.SOF_VerifySignedBinaryData(Cert, SignValue)
|
|
1773
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
WebsocketInterface.SOF_VerifySignedBinaryData = function (Cert, SignValue, cb, ctx) {
|
|
1777
|
+
var paramArray = [Cert, SignValue]
|
|
1778
|
+
WebsocketApp.callMethod('SOF_VerifySignedBinaryData', cb, ctx, 'bool', paramArray)
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
ComInterface.SOF_EncryptBinaryData = function (Cert, cb, ctx) {
|
|
1782
|
+
var ret = XTXAPP.SOF_EncryptBinaryData(Cert)
|
|
1783
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
WebsocketInterface.SOF_EncryptBinaryData = function (Cert, cb, ctx) {
|
|
1787
|
+
var paramArray = [Cert]
|
|
1788
|
+
WebsocketApp.callMethod('SOF_EncryptBinaryData', cb, ctx, 'string', paramArray)
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
ComInterface.SOF_EncryptBinaryDataEx = function (Cert, cb, ctx) {
|
|
1792
|
+
var ret = XTXAPP.SOF_EncryptBinaryDataEx(Cert)
|
|
1793
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
WebsocketInterface.SOF_EncryptBinaryDataEx = function (Cert, cb, ctx) {
|
|
1797
|
+
var paramArray = [Cert]
|
|
1798
|
+
WebsocketApp.callMethod('SOF_EncryptBinaryDataEx', cb, ctx, 'string', paramArray)
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
ComInterface.SOF_DecryptBinaryData = function (CertID, InData, cb, ctx) {
|
|
1802
|
+
var ret = XTXAPP.SOF_DecryptBinaryData(CertID, InData)
|
|
1803
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
WebsocketInterface.SOF_DecryptBinaryData = function (CertID, InData, cb, ctx) {
|
|
1807
|
+
var paramArray = [CertID, InData]
|
|
1808
|
+
WebsocketApp.callMethod('SOF_DecryptBinaryData', cb, ctx, 'string', paramArray)
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
ComInterface.SOF_SignBinaryMessage = function (dwFlag, CertID, cb, ctx) {
|
|
1812
|
+
var ret = XTXAPP.SOF_SignBinaryMessage(dwFlag, CertID)
|
|
1813
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
WebsocketInterface.SOF_SignBinaryMessage = function (dwFlag, CertID, cb, ctx) {
|
|
1817
|
+
var paramArray = [dwFlag, CertID]
|
|
1818
|
+
WebsocketApp.callMethod('SOF_SignBinaryMessage', cb, ctx, 'string', paramArray)
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
ComInterface.SOF_VerifySignedBinaryMessage = function (MessageData, cb, ctx) {
|
|
1822
|
+
var ret = XTXAPP.SOF_VerifySignedBinaryMessage(MessageData)
|
|
1823
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
WebsocketInterface.SOF_VerifySignedBinaryMessage = function (MessageData, cb, ctx) {
|
|
1827
|
+
var paramArray = [MessageData]
|
|
1828
|
+
WebsocketApp.callMethod('SOF_VerifySignedBinaryMessage', cb, ctx, 'bool', paramArray)
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
ComInterface.SOF_PubKeyBinaryEncrypt = function (Cert, cb, ctx) {
|
|
1832
|
+
var ret = XTXAPP.SOF_PubKeyBinaryEncrypt(Cert)
|
|
1833
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
WebsocketInterface.SOF_PubKeyBinaryEncrypt = function (Cert, cb, ctx) {
|
|
1837
|
+
var paramArray = [Cert]
|
|
1838
|
+
WebsocketApp.callMethod('SOF_PubKeyBinaryEncrypt', cb, ctx, 'string', paramArray)
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
ComInterface.SOF_PriKeyBinaryDecrypt = function (CertID, InData, cb, ctx) {
|
|
1842
|
+
var ret = XTXAPP.SOF_PriKeyBinaryDecrypt(CertID, InData)
|
|
1843
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
WebsocketInterface.SOF_PriKeyBinaryDecrypt = function (CertID, InData, cb, ctx) {
|
|
1847
|
+
var paramArray = [CertID, InData]
|
|
1848
|
+
WebsocketApp.callMethod('SOF_PriKeyBinaryDecrypt', cb, ctx, 'string', paramArray)
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
ComInterface.SOF_Base64BinaryEncode = function (cb, ctx) {
|
|
1852
|
+
var ret = XTXAPP.SOF_Base64BinaryEncode()
|
|
1853
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
WebsocketInterface.SOF_Base64BinaryEncode = function (cb, ctx) {
|
|
1857
|
+
var paramArray = []
|
|
1858
|
+
WebsocketApp.callMethod('SOF_Base64BinaryEncode', cb, ctx, 'string', paramArray)
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
ComInterface.SOF_Base64BinaryDecode = function (sIndata, cb, ctx) {
|
|
1862
|
+
var ret = XTXAPP.SOF_Base64BinaryDecode(sIndata)
|
|
1863
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
WebsocketInterface.SOF_Base64BinaryDecode = function (sIndata, cb, ctx) {
|
|
1867
|
+
var paramArray = [sIndata]
|
|
1868
|
+
WebsocketApp.callMethod('SOF_Base64BinaryDecode', cb, ctx, 'string', paramArray)
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
ComInterface.SOF_HashBinaryData = function (hashAlg, sCert, sID, cb, ctx) {
|
|
1872
|
+
var ret = XTXAPP.SOF_HashBinaryData(hashAlg, sCert, sID)
|
|
1873
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
WebsocketInterface.SOF_HashBinaryData = function (hashAlg, sCert, sID, cb, ctx) {
|
|
1877
|
+
var paramArray = [hashAlg, sCert, sID]
|
|
1878
|
+
WebsocketApp.callMethod('SOF_HashBinaryData', cb, ctx, 'string', paramArray)
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
ComInterface.SOF_SignBinaryDataByPriKey = function (sPriKey, sCert, cb, ctx) {
|
|
1882
|
+
var ret = XTXAPP.SOF_SignBinaryDataByPriKey(sPriKey, sCert)
|
|
1883
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
WebsocketInterface.SOF_SignBinaryDataByPriKey = function (sPriKey, sCert, cb, ctx) {
|
|
1887
|
+
var paramArray = [sPriKey, sCert]
|
|
1888
|
+
WebsocketApp.callMethod('SOF_SignBinaryDataByPriKey', cb, ctx, 'string', paramArray)
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
ComInterface.ImportPfxToDevice = function (sDeviceSN, sContainerName, bSign, strPfx, strPfxPass, cb, ctx) {
|
|
1892
|
+
var ret = XTXAPP.ImportPfxToDevice(sDeviceSN, sContainerName, bSign, strPfx, strPfxPass)
|
|
1893
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
WebsocketInterface.ImportPfxToDevice = function (sDeviceSN, sContainerName, bSign, strPfx, strPfxPass, cb, ctx) {
|
|
1897
|
+
var paramArray = [sDeviceSN, sContainerName, bSign, strPfx, strPfxPass]
|
|
1898
|
+
WebsocketApp.callMethod('ImportPfxToDevice', cb, ctx, 'bool', paramArray)
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
ComInterface.SOF_HashDataEx = function (hashAlg, sInData, sCert, sID, cb, ctx) {
|
|
1902
|
+
var ret = XTXAPP.SOF_HashDataEx(hashAlg, sInData, sCert, sID)
|
|
1903
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
WebsocketInterface.SOF_HashDataEx = function (hashAlg, sInData, sCert, sID, cb, ctx) {
|
|
1907
|
+
var paramArray = [hashAlg, sInData, sCert, sID]
|
|
1908
|
+
WebsocketApp.callMethod('SOF_HashDataEx', cb, ctx, 'string', paramArray)
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
ComInterface.SOF_HashFileEx = function (hashAlg, inFile, sCert, sID, cb, ctx) {
|
|
1912
|
+
var ret = XTXAPP.SOF_HashFileEx(hashAlg, inFile, sCert, sID)
|
|
1913
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
WebsocketInterface.SOF_HashFileEx = function (hashAlg, inFile, sCert, sID, cb, ctx) {
|
|
1917
|
+
var paramArray = [hashAlg, inFile, sCert, sID]
|
|
1918
|
+
WebsocketApp.callMethod('SOF_HashFileEx', cb, ctx, 'string', paramArray)
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
ComInterface.GetDeviceCountEx = function (type, cb, ctx) {
|
|
1922
|
+
var ret = XTXAPP.GetDeviceCountEx(type)
|
|
1923
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
WebsocketInterface.GetDeviceCountEx = function (type, cb, ctx) {
|
|
1927
|
+
var paramArray = [type]
|
|
1928
|
+
WebsocketApp.callMethod('GetDeviceCountEx', cb, ctx, 'number', paramArray)
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
ComInterface.GetAllDeviceSNEx = function (type, cb, ctx) {
|
|
1932
|
+
var ret = XTXAPP.GetAllDeviceSNEx(type)
|
|
1933
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
WebsocketInterface.GetAllDeviceSNEx = function (type, cb, ctx) {
|
|
1937
|
+
var paramArray = [type]
|
|
1938
|
+
WebsocketApp.callMethod('GetAllDeviceSNEx', cb, ctx, 'string', paramArray)
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
ComInterface.SOF_UpdateCert = function (CertID, type, cb, ctx) {
|
|
1942
|
+
var ret = XTXAPP.SOF_UpdateCert(CertID, type)
|
|
1943
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
WebsocketInterface.SOF_UpdateCert = function (CertID, type, cb, ctx) {
|
|
1947
|
+
var paramArray = [CertID, type]
|
|
1948
|
+
WebsocketApp.callMethod('SOF_UpdateCert', cb, ctx, 'number', paramArray)
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
ComInterface.OpenSpecifiedFolder = function (backupFilePath, cb, ctx) {
|
|
1952
|
+
var ret = XTXAPP.OpenSpecifiedFolder(backupFilePath)
|
|
1953
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
WebsocketInterface.OpenSpecifiedFolder = function (backupFilePath, cb, ctx) {
|
|
1957
|
+
var paramArray = [backupFilePath]
|
|
1958
|
+
WebsocketApp.callMethod('OpenSpecifiedFolder', cb, ctx, 'string', paramArray)
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
ComInterface.OTP_GetChallengeCodeEx = function (sCertID, szAccount, money, cb, ctx) {
|
|
1962
|
+
var ret = XTXAPP.OTP_GetChallengeCodeEx(sCertID, szAccount, money)
|
|
1963
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
WebsocketInterface.OTP_GetChallengeCodeEx = function (sCertID, szAccount, money, cb, ctx) {
|
|
1967
|
+
var paramArray = [sCertID, szAccount, money]
|
|
1968
|
+
WebsocketApp.callMethod('OTP_GetChallengeCodeEx', cb, ctx, 'string', paramArray)
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
ComInterface.Base64DecodeFile = function (sInData, sFilePath, cb, ctx) {
|
|
1972
|
+
var ret = XTXAPP.Base64DecodeFile(sInData, sFilePath)
|
|
1973
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
WebsocketInterface.Base64DecodeFile = function (sInData, sFilePath, cb, ctx) {
|
|
1977
|
+
var paramArray = [sInData, sFilePath]
|
|
1978
|
+
WebsocketApp.callMethod('Base64DecodeFile', cb, ctx, 'bool', paramArray)
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
ComInterface.EnumFilesInDevice = function (sDeviceSN, cb, ctx) {
|
|
1982
|
+
var ret = XTXAPP.EnumFilesInDevice(sDeviceSN)
|
|
1983
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
WebsocketInterface.EnumFilesInDevice = function (sDeviceSN, cb, ctx) {
|
|
1987
|
+
var paramArray = [sDeviceSN]
|
|
1988
|
+
WebsocketApp.callMethod('EnumFilesInDevice', cb, ctx, 'string', paramArray)
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
ComInterface.OTP_Halt = function (sCertID, cb, ctx) {
|
|
1992
|
+
var ret = XTXAPP.OTP_Halt(sCertID)
|
|
1993
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
WebsocketInterface.OTP_Halt = function (sCertID, cb, ctx) {
|
|
1997
|
+
var paramArray = [sCertID]
|
|
1998
|
+
WebsocketApp.callMethod('OTP_Halt', cb, ctx, 'bool', paramArray)
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
ComInterface.SOF_TSGenREQ = function (b64Hash, hashAlg, bReqCert, policyID, b64Nonce, b64Extension, cb, ctx) {
|
|
2002
|
+
var ret = XTXAPP.SOF_TSGenREQ(b64Hash, hashAlg, bReqCert, policyID, b64Nonce, b64Extension)
|
|
2003
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
WebsocketInterface.SOF_TSGenREQ = function (b64Hash, hashAlg, bReqCert, policyID, b64Nonce, b64Extension, cb, ctx) {
|
|
2007
|
+
var paramArray = [b64Hash, hashAlg, bReqCert, policyID, b64Nonce, b64Extension]
|
|
2008
|
+
WebsocketApp.callMethod('SOF_TSGenREQ', cb, ctx, 'string', paramArray)
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
ComInterface.SOF_TSCompareNonce = function (b64TSReq, b64TSAResp, cb, ctx) {
|
|
2012
|
+
var ret = XTXAPP.SOF_TSCompareNonce(b64TSReq, b64TSAResp)
|
|
2013
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
WebsocketInterface.SOF_TSCompareNonce = function (b64TSReq, b64TSAResp, cb, ctx) {
|
|
2017
|
+
var paramArray = [b64TSReq, b64TSAResp]
|
|
2018
|
+
WebsocketApp.callMethod('SOF_TSCompareNonce', cb, ctx, 'bool', paramArray)
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
ComInterface.SOF_TSGenPDFSignature = function (b64TSAResp, b64OriPDFSignature, cb, ctx) {
|
|
2022
|
+
var ret = XTXAPP.SOF_TSGenPDFSignature(b64TSAResp, b64OriPDFSignature)
|
|
2023
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
WebsocketInterface.SOF_TSGenPDFSignature = function (b64TSAResp, b64OriPDFSignature, cb, ctx) {
|
|
2027
|
+
var paramArray = [b64TSAResp, b64OriPDFSignature]
|
|
2028
|
+
WebsocketApp.callMethod('SOF_TSGenPDFSignature', cb, ctx, 'string', paramArray)
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
ComInterface.SOF_TSVerifyPDFSignature = function (b64TSPDFSignature, cb, ctx) {
|
|
2032
|
+
var ret = XTXAPP.SOF_TSVerifyPDFSignature(b64TSPDFSignature)
|
|
2033
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
WebsocketInterface.SOF_TSVerifyPDFSignature = function (b64TSPDFSignature, cb, ctx) {
|
|
2037
|
+
var paramArray = [b64TSPDFSignature]
|
|
2038
|
+
WebsocketApp.callMethod('SOF_TSVerifyPDFSignature', cb, ctx, 'bool', paramArray)
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
ComInterface.SOF_TSGetPDFSignatureInfo = function (b64TSPDFSignature, iType, cb, ctx) {
|
|
2042
|
+
var ret = XTXAPP.SOF_TSGetPDFSignatureInfo(b64TSPDFSignature, iType)
|
|
2043
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
WebsocketInterface.SOF_TSGetPDFSignatureInfo = function (b64TSPDFSignature, iType, cb, ctx) {
|
|
2047
|
+
var paramArray = [b64TSPDFSignature, iType]
|
|
2048
|
+
WebsocketApp.callMethod('SOF_TSGetPDFSignatureInfo', cb, ctx, 'string', paramArray)
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
ComInterface.OTP_GetState = function (sCertID, bCert, cb, ctx) {
|
|
2052
|
+
var ret = XTXAPP.OTP_GetState(sCertID, bCert)
|
|
2053
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
WebsocketInterface.OTP_GetState = function (sCertID, bCert, cb, ctx) {
|
|
2057
|
+
var paramArray = [sCertID, bCert]
|
|
2058
|
+
WebsocketApp.callMethod('OTP_GetState', cb, ctx, 'string', paramArray)
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
ComInterface.OTP_GetSyncCode = function (sCertID, ChallengeCode, cb, ctx) {
|
|
2062
|
+
var ret = XTXAPP.OTP_GetSyncCode(sCertID, ChallengeCode)
|
|
2063
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
WebsocketInterface.OTP_GetSyncCode = function (sCertID, ChallengeCode, cb, ctx) {
|
|
2067
|
+
var paramArray = [sCertID, ChallengeCode]
|
|
2068
|
+
WebsocketApp.callMethod('OTP_GetSyncCode', cb, ctx, 'string', paramArray)
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
ComInterface.SOF_IsLogin = function (CertID, cb, ctx) {
|
|
2072
|
+
var ret = XTXAPP.SOF_IsLogin(CertID)
|
|
2073
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
WebsocketInterface.SOF_IsLogin = function (CertID, cb, ctx) {
|
|
2077
|
+
var paramArray = [CertID]
|
|
2078
|
+
WebsocketApp.callMethod('SOF_IsLogin', cb, ctx, 'bool', paramArray)
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
ComInterface.SOF_LoginEx = function (CertID, PassWd, updateFlag, cb, ctx) {
|
|
2082
|
+
var ret = XTXAPP.SOF_LoginEx(CertID, PassWd, updateFlag)
|
|
2083
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
WebsocketInterface.SOF_LoginEx = function (CertID, PassWd, updateFlag, cb, ctx) {
|
|
2087
|
+
var paramArray = [CertID, PassWd, updateFlag]
|
|
2088
|
+
WebsocketApp.callMethod('SOF_LoginEx', cb, ctx, 'bool', paramArray)
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
ComInterface.EnumSupportDeviceList = function (cb, ctx) {
|
|
2092
|
+
var ret = XTXAPP.EnumSupportDeviceList()
|
|
2093
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
WebsocketInterface.EnumSupportDeviceList = function (cb, ctx) {
|
|
2097
|
+
var paramArray = []
|
|
2098
|
+
WebsocketApp.callMethod('EnumSupportDeviceList', cb, ctx, 'string', paramArray)
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
ComInterface.ExportPfxFromDevice = function (sDeviceSN, sContainerName, bSign, strPfxPass, cb, ctx) {
|
|
2102
|
+
var ret = XTXAPP.ExportPfxFromDevice(sDeviceSN, sContainerName, bSign, strPfxPass)
|
|
2103
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
WebsocketInterface.ExportPfxFromDevice = function (sDeviceSN, sContainerName, bSign, strPfxPass, cb, ctx) {
|
|
2107
|
+
var paramArray = [sDeviceSN, sContainerName, bSign, strPfxPass]
|
|
2108
|
+
WebsocketApp.callMethod('ExportPfxFromDevice', cb, ctx, 'string', paramArray)
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
ComInterface.SOF_SignHashMessage = function (CertID, InHashData, hashAlg, cb, ctx) {
|
|
2112
|
+
var ret = XTXAPP.SOF_SignHashMessage(CertID, InHashData, hashAlg)
|
|
2113
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
WebsocketInterface.SOF_SignHashMessage = function (CertID, InHashData, hashAlg, cb, ctx) {
|
|
2117
|
+
var paramArray = [CertID, InHashData, hashAlg]
|
|
2118
|
+
WebsocketApp.callMethod('SOF_SignHashMessage', cb, ctx, 'string', paramArray)
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
ComInterface.ExportPfxToFile = function (sDeviceSN, sContainerName, bSign, strPfxPass, cb, ctx) {
|
|
2122
|
+
var ret = XTXAPP.ExportPfxToFile(sDeviceSN, sContainerName, bSign, strPfxPass)
|
|
2123
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
WebsocketInterface.ExportPfxToFile = function (sDeviceSN, sContainerName, bSign, strPfxPass, cb, ctx) {
|
|
2127
|
+
var paramArray = [sDeviceSN, sContainerName, bSign, strPfxPass]
|
|
2128
|
+
WebsocketApp.callMethod('ExportPfxToFile', cb, ctx, 'string', paramArray)
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
ComInterface.SOF_SignAPK = function (CertID, strOriSignature, cb, ctx) {
|
|
2132
|
+
var ret = XTXAPP.SOF_SignAPK(CertID, strOriSignature)
|
|
2133
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
WebsocketInterface.SOF_SignAPK = function (CertID, strOriSignature, cb, ctx) {
|
|
2137
|
+
var paramArray = [CertID, strOriSignature]
|
|
2138
|
+
WebsocketApp.callMethod('SOF_SignAPK', cb, ctx, 'string', paramArray)
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
ComInterface.SOF_ListenUKey = function (Parm, cb, ctx) {
|
|
2142
|
+
var ret = XTXAPP.SOF_ListenUKey(Parm)
|
|
2143
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
WebsocketInterface.SOF_ListenUKey = function (Parm, cb, ctx) {
|
|
2147
|
+
var paramArray = [Parm]
|
|
2148
|
+
WebsocketApp.callMethod('SOF_ListenUKey', cb, ctx, 'string', paramArray)
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
ComInterface.SOF_EnableLoginWindow = function (Parm, cb, ctx) {
|
|
2152
|
+
var ret = XTXAPP.SOF_EnableLoginWindow(Parm)
|
|
2153
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
WebsocketInterface.SOF_EnableLoginWindow = function (Parm, cb, ctx) {
|
|
2157
|
+
var paramArray = [Parm]
|
|
2158
|
+
WebsocketApp.callMethod('SOF_EnableLoginWindow', cb, ctx, 'string', paramArray)
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
ComInterface.SOF_SignEnvelope = function (CertID, Cert, InData, cb, ctx) {
|
|
2162
|
+
var ret = XTXAPP.SOF_SignEnvelope(CertID, Cert, InData)
|
|
2163
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
WebsocketInterface.SOF_SignEnvelope = function (CertID, Cert, InData, cb, ctx) {
|
|
2167
|
+
var paramArray = [CertID, Cert, InData]
|
|
2168
|
+
WebsocketApp.callMethod('SOF_SignEnvelope', cb, ctx, 'string', paramArray)
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
ComInterface.SOF_UnSignEnvelope = function (CertID, InData, cb, ctx) {
|
|
2172
|
+
var ret = XTXAPP.SOF_UnSignEnvelope(CertID, InData)
|
|
2173
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
WebsocketInterface.SOF_UnSignEnvelope = function (CertID, InData, cb, ctx) {
|
|
2177
|
+
var paramArray = [CertID, InData]
|
|
2178
|
+
WebsocketApp.callMethod('SOF_UnSignEnvelope', cb, ctx, 'string', paramArray)
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
init_Interface('SOF_SetSignMethod', 'SetSignMethod')
|
|
2182
|
+
init_Interface('SOF_GetSignMethod')
|
|
2183
|
+
init_Interface('SOF_SetEncryptMethod')
|
|
2184
|
+
init_Interface('SOF_GetEncryptMethod')
|
|
2185
|
+
init_Interface('SOF_GetUserList', 'GetUserList')
|
|
2186
|
+
init_Interface('SOF_ExportUserCert', 'GetSignCert')
|
|
2187
|
+
init_Interface('SOF_Login', 'VerifyUserPIN')
|
|
2188
|
+
init_Interface('SOF_GetPinRetryCount', 'GetUserPINRetryCount')
|
|
2189
|
+
init_Interface('SOF_ChangePassWd', 'ChangeUserPassword')
|
|
2190
|
+
init_Interface('SOF_GetCertInfo', 'GetCertBasicinfo')
|
|
2191
|
+
init_Interface('SOF_GetCertInfoByOid', 'GetExtCertInfoByOID')
|
|
2192
|
+
init_Interface('SOF_SignData', 'SignedData')
|
|
2193
|
+
init_Interface('SOF_VerifySignedData', 'VerifySignedData')
|
|
2194
|
+
init_Interface('SOF_SignFile', 'SignFile')
|
|
2195
|
+
init_Interface('SOF_VerifySignedFile', 'VerifySignFile')
|
|
2196
|
+
init_Interface('SOF_EncryptData', 'EncodeP7Enveloped')
|
|
2197
|
+
init_Interface('SOF_DecryptData', 'DecodeP7Enveloped')
|
|
2198
|
+
init_Interface('SOF_EncryptFile')
|
|
2199
|
+
init_Interface('SOF_DecryptFile')
|
|
2200
|
+
init_Interface('SOF_SignMessage', 'SignByP7')
|
|
2201
|
+
init_Interface('SOF_VerifySignedMessage', 'VerifyDatabyP7')
|
|
2202
|
+
init_Interface('SOF_GetInfoFromSignedMessage')
|
|
2203
|
+
init_Interface('SOF_SignDataXML')
|
|
2204
|
+
init_Interface('SOF_VerifySignedDataXML')
|
|
2205
|
+
init_Interface('SOF_GetXMLSignatureInfo')
|
|
2206
|
+
init_Interface('SOF_GenRandom', 'GenerateRandom')
|
|
2207
|
+
init_Interface('SOF_PubKeyEncrypt', 'PubKeyEncrypt')
|
|
2208
|
+
init_Interface('SOF_PriKeyDecrypt', 'PriKeyDecrypt')
|
|
2209
|
+
init_Interface('SOF_SecertSegment')
|
|
2210
|
+
init_Interface('SOF_SecertRecovery')
|
|
2211
|
+
init_Interface('SOF_GetLastError')
|
|
2212
|
+
init_Interface('GetDeviceCount')
|
|
2213
|
+
init_Interface('GetAllDeviceSN')
|
|
2214
|
+
init_Interface('GetDeviceSNByIndex')
|
|
2215
|
+
init_Interface('GetDeviceInfo')
|
|
2216
|
+
init_Interface('ChangeAdminPass')
|
|
2217
|
+
init_Interface('UnlockUserPass')
|
|
2218
|
+
init_Interface('GenerateKeyPair')
|
|
2219
|
+
init_Interface('ExportPubKey')
|
|
2220
|
+
init_Interface('ImportSignCert')
|
|
2221
|
+
init_Interface('ImportEncCert')
|
|
2222
|
+
init_Interface('ReadFile')
|
|
2223
|
+
init_Interface('WriteFile')
|
|
2224
|
+
init_Interface('IsContainerExist')
|
|
2225
|
+
init_Interface('DeleteContainer')
|
|
2226
|
+
init_Interface('ExportPKCS10')
|
|
2227
|
+
init_Interface('InitDevice')
|
|
2228
|
+
init_Interface('CertListFormElement')
|
|
2229
|
+
init_Interface('AlertBeforeCertDate')
|
|
2230
|
+
init_Interface('ServerSignedData')
|
|
2231
|
+
init_Interface('ServerRan')
|
|
2232
|
+
init_Interface('ServerCert')
|
|
2233
|
+
init_Interface('ServerMode')
|
|
2234
|
+
init_Interface('ShowError')
|
|
2235
|
+
init_Interface('AddSignInfo')
|
|
2236
|
+
init_Interface('SOF_GetVersion')
|
|
2237
|
+
init_Interface('SOF_ExportExChangeUserCert', 'GetExchCert')
|
|
2238
|
+
init_Interface('SOF_ValidateCert', 'ValidateCert')
|
|
2239
|
+
init_Interface('GetENVSN')
|
|
2240
|
+
init_Interface('SetENVSN')
|
|
2241
|
+
init_Interface('IsDeviceExist')
|
|
2242
|
+
init_Interface('GetContainerCount')
|
|
2243
|
+
init_Interface('SOF_SymEncryptData', 'EncryptData')
|
|
2244
|
+
init_Interface('SOF_SymDecryptData', 'DecryptData')
|
|
2245
|
+
init_Interface('SOF_SymEncryptFile', 'EncryptFile')
|
|
2246
|
+
init_Interface('SOF_SymDecryptFile', 'DecryptFile')
|
|
2247
|
+
init_Interface('SOF_GetLastErrMsg')
|
|
2248
|
+
init_Interface('SOF_Base64Encode')
|
|
2249
|
+
init_Interface('SOF_Base64Decode')
|
|
2250
|
+
init_Interface('SOF_HashData', 'SignHashData')
|
|
2251
|
+
init_Interface('SOF_HashFile', 'HashFile')
|
|
2252
|
+
init_Interface('UnlockUserPassEx')
|
|
2253
|
+
init_Interface('DeleteOldContainer')
|
|
2254
|
+
init_Interface('WriteFileEx')
|
|
2255
|
+
init_Interface('ReadFileEx')
|
|
2256
|
+
init_Interface('SOF_EncryptDataEx', 'EncodeP7Enveloped')
|
|
2257
|
+
init_Interface('Base64EncodeFile')
|
|
2258
|
+
init_Interface('SOF_GetRetryCount')
|
|
2259
|
+
init_Interface('SOF_GetAllContainerName')
|
|
2260
|
+
init_Interface('CreateSoftDevice')
|
|
2261
|
+
init_Interface('DeleteSoftDevice')
|
|
2262
|
+
init_Interface('EnableSoftDevice')
|
|
2263
|
+
init_Interface('SoftDeviceBackup')
|
|
2264
|
+
init_Interface('SoftDeviceRestore')
|
|
2265
|
+
init_Interface('SOF_Logout', 'Logout')
|
|
2266
|
+
init_Interface('SetUserConfig')
|
|
2267
|
+
init_Interface('SOF_SignByteData')
|
|
2268
|
+
init_Interface('SOF_VerifySignedByteData')
|
|
2269
|
+
init_Interface('OTP_GetChallengeCode')
|
|
2270
|
+
init_Interface('ImportEncCertEx')
|
|
2271
|
+
init_Interface('SOF_GetCertEntity', 'GetCertEntity')
|
|
2272
|
+
init_Interface('SOF_HMAC')
|
|
2273
|
+
init_Interface('SOF_SignDataByPriKey')
|
|
2274
|
+
init_Interface('ImportKeyCertToSoftDevice')
|
|
2275
|
+
init_Interface('InitDeviceEx')
|
|
2276
|
+
init_Interface('SelectFile')
|
|
2277
|
+
init_Interface('SOF_SignHashData', 'SignHashData')
|
|
2278
|
+
init_Interface('SOF_VerifySignedHashData', 'VerifySignedHashData')
|
|
2279
|
+
init_Interface('CheckSoftDeviceEnv')
|
|
2280
|
+
init_Interface('SOF_SignBinaryData')
|
|
2281
|
+
init_Interface('SOF_VerifySignedBinaryData')
|
|
2282
|
+
init_Interface('SOF_EncryptBinaryData')
|
|
2283
|
+
init_Interface('SOF_EncryptBinaryDataEx')
|
|
2284
|
+
init_Interface('SOF_DecryptBinaryData')
|
|
2285
|
+
init_Interface('SOF_SignBinaryMessage')
|
|
2286
|
+
init_Interface('SOF_VerifySignedBinaryMessage')
|
|
2287
|
+
init_Interface('SOF_PubKeyBinaryEncrypt')
|
|
2288
|
+
init_Interface('SOF_PriKeyBinaryDecrypt')
|
|
2289
|
+
init_Interface('SOF_Base64BinaryEncode')
|
|
2290
|
+
init_Interface('SOF_Base64BinaryDecode')
|
|
2291
|
+
init_Interface('SOF_HashBinaryData')
|
|
2292
|
+
init_Interface('SOF_SignBinaryDataByPriKey')
|
|
2293
|
+
init_Interface('ImportPfxToDevice')
|
|
2294
|
+
init_Interface('SOF_HashDataEx')
|
|
2295
|
+
init_Interface('SOF_HashFileEx')
|
|
2296
|
+
init_Interface('GetDeviceCountEx')
|
|
2297
|
+
init_Interface('GetAllDeviceSNEx')
|
|
2298
|
+
init_Interface('SOF_UpdateCert')
|
|
2299
|
+
init_Interface('OpenSpecifiedFolder')
|
|
2300
|
+
init_Interface('OTP_GetChallengeCodeEx')
|
|
2301
|
+
init_Interface('Base64DecodeFile')
|
|
2302
|
+
init_Interface('EnumFilesInDevice')
|
|
2303
|
+
init_Interface('OTP_Halt')
|
|
2304
|
+
init_Interface('SOF_TSGenREQ')
|
|
2305
|
+
init_Interface('SOF_TSCompareNonce')
|
|
2306
|
+
init_Interface('SOF_TSGenPDFSignature')
|
|
2307
|
+
init_Interface('SOF_TSVerifyPDFSignature')
|
|
2308
|
+
init_Interface('SOF_TSGetPDFSignatureInfo')
|
|
2309
|
+
init_Interface('OTP_GetState')
|
|
2310
|
+
init_Interface('OTP_GetSyncCode')
|
|
2311
|
+
init_Interface('SOF_IsLogin')
|
|
2312
|
+
init_Interface('SOF_LoginEx')
|
|
2313
|
+
init_Interface('EnumSupportDeviceList')
|
|
2314
|
+
init_Interface('ExportPfxFromDevice')
|
|
2315
|
+
init_Interface('SOF_SignHashMessage')
|
|
2316
|
+
init_Interface('ExportPfxToFile')
|
|
2317
|
+
init_Interface('SOF_SignAPK')
|
|
2318
|
+
init_Interface('SOF_ListenUKey')
|
|
2319
|
+
init_Interface('SOF_EnableLoginWindow')
|
|
2320
|
+
init_Interface('SOF_SignEnvelope')
|
|
2321
|
+
init_Interface('SOF_UnSignEnvelope')
|
|
2322
|
+
|
|
2323
|
+
//template_gen_end
|
|
2324
|
+
|
|
2325
|
+
//getpic template_gen
|
|
2326
|
+
PicComInterface.GetPic = function (bstrConName, cb, ctx) {
|
|
2327
|
+
var ret = OGetPic.GetPic(bstrConName)
|
|
2328
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
WebsocketInterface.GetPic = function (bstrConName, cb, ctx) {
|
|
2332
|
+
var paramArray = [bstrConName]
|
|
2333
|
+
WebsocketApp.callMethod('GetPic', cb, ctx, 'string', paramArray)
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
PicComInterface.Hash = function (inData, cb, ctx) {
|
|
2337
|
+
var ret = OGetPic.Hash(inData)
|
|
2338
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
WebsocketInterface.Hash = function (inData, cb, ctx) {
|
|
2342
|
+
var paramArray = [inData]
|
|
2343
|
+
WebsocketApp.callMethod('Hash', cb, ctx, 'string', paramArray)
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
PicComInterface.ConvertPicFormat = function (inData, type, cb, ctx) {
|
|
2347
|
+
var ret = OGetPic.ConvertPicFormat(inData, type)
|
|
2348
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
WebsocketInterface.ConvertPicFormat = function (inData, type, cb, ctx) {
|
|
2352
|
+
var paramArray = [inData, type]
|
|
2353
|
+
WebsocketApp.callMethod('ConvertPicFormat', cb, ctx, 'string', paramArray)
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
PicComInterface.ConvertGif2Jpg = function (inData, cb, ctx) {
|
|
2357
|
+
var ret = OGetPic.ConvertGif2Jpg(inData)
|
|
2358
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
WebsocketInterface.ConvertGif2Jpg = function (inData, cb, ctx) {
|
|
2362
|
+
var paramArray = [inData]
|
|
2363
|
+
WebsocketApp.callMethod('ConvertGif2Jpg', cb, ctx, 'string', paramArray)
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
PicComInterface.GetPic1 = function (bstrConName, cb, ctx) {
|
|
2367
|
+
var ret = OGetPic.GetPic1(bstrConName)
|
|
2368
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
WebsocketInterface.GetPic1 = function (bstrConName, cb, ctx) {
|
|
2372
|
+
var paramArray = [bstrConName]
|
|
2373
|
+
WebsocketApp.callMethod('GetPic1', cb, ctx, 'string', paramArray)
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
PicComInterface.ConvertPicSize = function (bstrPic, w, h, cb, ctx) {
|
|
2377
|
+
var ret = OGetPic.ConvertPicSize(bstrPic, w, h)
|
|
2378
|
+
return $myOKRtnFunc(ret, cb, ctx)
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
WebsocketInterface.ConvertPicSize = function (bstrPic, w, h, cb, ctx) {
|
|
2382
|
+
var paramArray = [bstrPic, w, h]
|
|
2383
|
+
WebsocketApp.callMethod('ConvertPicSize', cb, ctx, 'string', paramArray)
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
init_Interface('GetPic')
|
|
2387
|
+
init_Interface('Hash')
|
|
2388
|
+
init_Interface('ConvertPicFormat')
|
|
2389
|
+
init_Interface('ConvertGif2Jpg')
|
|
2390
|
+
init_Interface('GetPic1')
|
|
2391
|
+
init_Interface('ConvertPicSize')
|
|
2392
|
+
|
|
2393
|
+
//getpic template_gen_end
|
|
2394
|
+
|
|
2395
|
+
window._bjca_init_ = init
|