ai.touchui-vue 1.30.2 → 1.30.4
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 +21 -21
- package/lib/affix.js +2 -2
- package/lib/ai.touchui-vue.common.js +2393 -2382
- package/lib/align.js +2 -2
- package/lib/animation.js +2 -2
- package/lib/article.js +2 -2
- package/lib/box.js +2 -2
- package/lib/button.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/card-item.js +2 -2
- package/lib/card.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/center-scroll.js +2 -2
- package/lib/chat.js +7 -7
- package/lib/checkbox.js +2 -2
- package/lib/checkboxes.js +2 -2
- package/lib/collapse.js +8 -7
- package/lib/color.js +7 -7
- package/lib/countdown.js +2 -2
- package/lib/date-picker.js +30 -12
- package/lib/date-range.js +13 -14
- package/lib/dialog.js +2 -2
- package/lib/dis.js +2 -2
- package/lib/ellipsis.js +2 -2
- package/lib/emote.js +2 -2
- package/lib/export.js +5 -5
- package/lib/filter.js +2 -2
- package/lib/fix.js +2 -2
- package/lib/float.js +2 -2
- package/lib/flow.js +4 -4
- package/lib/form.js +2 -2
- package/lib/grid.js +2 -2
- package/lib/guider.js +2 -2
- package/lib/header.js +2 -2
- package/lib/hide.js +2 -2
- package/lib/icon.js +2 -2
- package/lib/import.js +2 -2
- package/lib/index.js +1 -1
- package/lib/index.js.LICENSE.txt +4 -0
- package/lib/input.js +2 -2
- package/lib/ip.js +2 -2
- package/lib/line.js +2 -2
- package/lib/loading.js +2 -2
- package/lib/locale/format.js +10 -10
- package/lib/longtap.js +2 -2
- package/lib/menu-icon.js +548 -547
- package/lib/message.js +2 -2
- package/lib/mixins/migrating.js +20 -20
- package/lib/mixins/transition.js +14 -14
- package/lib/msg.js +2 -2
- package/lib/org.js +10 -9
- package/lib/padding.js +2 -2
- package/lib/page.js +8 -7
- package/lib/param.js +2 -2
- package/lib/pic.js +2 -2
- package/lib/popup.js +2 -2
- package/lib/progress.js +2 -2
- package/lib/range.js +5 -5
- package/lib/rate.js +2 -2
- package/lib/reverser.js +2 -2
- package/lib/scroll.js +2 -2
- package/lib/segment.js +2 -2
- package/lib/select.js +2 -2
- package/lib/size.js +2 -2
- package/lib/skeleton.js +2 -2
- package/lib/slide.js +2 -2
- package/lib/space.js +2 -2
- package/lib/static/{net-mix.293a4b6.svg → net-mix.dc6e414.svg} +7 -7
- package/lib/step.js +2 -2
- package/lib/submit.js +2 -2
- package/lib/switch.js +2 -2
- package/lib/tab.js +2 -2
- package/lib/table.js +736 -742
- package/lib/tag.js +2 -2
- package/lib/timeline.js +2 -2
- package/lib/tip.js +2 -2
- package/lib/tooltip.js +2 -2
- package/lib/transfer.js +2 -2
- package/lib/tree.js +2 -2
- package/lib/upload.js +2 -2
- package/lib/utils/clickoutside.js +11 -11
- package/lib/utils/dom.js +13 -13
- package/lib/utils/filetransfer.js +4 -4
- package/lib/utils/jsencrypt/JSEncrypt.js +77 -77
- package/lib/utils/jsencrypt/JSEncryptRSAKey.js +115 -115
- package/lib/utils/jsencrypt/jselib/asn1js/asn1.js +4 -4
- package/lib/utils/jsencrypt/jselib/jsrsasign/asn1-1.0.js +734 -734
- package/lib/utils/jsencrypt/jselib/jsrsasign/yahoo.js +22 -22
- package/lib/utils/jsencrypt.js +260 -260
- package/lib/utils/md5.js +3 -3
- package/lib/utils/mime.js +2 -2
- package/lib/utils/ratio.js +54 -53
- package/lib/utils/sign.js +12 -12
- package/lib/utils/util.js +3 -3
- package/lib/utils/validate.js +11 -11
- package/package.json +160 -159
- package/packages/affix/index.js +8 -8
- package/packages/affix/src/affix.vue +139 -139
- package/packages/align/index.js +8 -8
- package/packages/align/src/directive.js +29 -29
- package/packages/animation/index.js +8 -8
- package/packages/animation/src/animation.vue +68 -68
- package/packages/article/index.js +8 -8
- package/packages/article/src/article.vue +23 -23
- package/packages/box/index.js +8 -8
- package/packages/box/src/box.vue +170 -170
- package/packages/button/index.js +8 -8
- package/packages/button/src/button.vue +162 -162
- package/packages/calendar/index.js +8 -8
- package/packages/calendar/src/calendar.vue +1142 -1142
- package/packages/card/index.js +10 -10
- package/packages/card/src/card-item.vue +92 -92
- package/packages/card/src/card.vue +175 -175
- package/packages/card-item/index.js +8 -8
- package/packages/cascader/index.js +8 -8
- package/packages/cascader/src/cascader.vue +814 -814
- package/packages/center-scroll/index.js +8 -8
- package/packages/center-scroll/src/center-scroll.vue +147 -147
- package/packages/chat/index.js +12 -12
- package/packages/chat/src/chat.vue +116 -116
- package/packages/checkbox/index.js +8 -8
- package/packages/checkbox/src/checkbox.vue +262 -262
- package/packages/checkboxes/index.js +8 -8
- package/packages/checkboxes/src/checkboxes.vue +97 -97
- package/packages/collapse/index.js +10 -10
- package/packages/collapse/src/collapse-item.vue +188 -188
- package/packages/collapse/src/collapse.vue +100 -100
- package/packages/color/index.js +8 -8
- package/packages/color/src/directive.js +42 -42
- package/packages/countdown/index.js +8 -8
- package/packages/countdown/src/countdown.vue +128 -128
- package/packages/date-picker/index.js +8 -8
- package/packages/date-picker/src/date-picker.vue +436 -432
- package/packages/date-picker/src/picker.vue +342 -342
- package/packages/date-range/index.js +8 -8
- package/packages/date-range/src/date-range.vue +384 -384
- package/packages/dialog/index.js +8 -8
- package/packages/dialog/src/dialog.vue +287 -287
- package/packages/dis/index.js +8 -8
- package/packages/dis/src/directive.js +42 -42
- package/packages/ellipsis/index.js +8 -8
- package/packages/ellipsis/src/ellipsis.vue +306 -306
- package/packages/emote/index.js +8 -8
- package/packages/emote/src/emote.vue +38 -38
- package/packages/export/index.js +8 -8
- package/packages/export/src/ajax.js +73 -73
- package/packages/export/src/export.vue +289 -289
- package/packages/filter/index.js +8 -8
- package/packages/filter/src/filter.vue +245 -245
- package/packages/fix/index.js +8 -8
- package/packages/fix/src/fix.vue +221 -221
- package/packages/float/index.js +16 -16
- package/packages/float/src/directive.js +20 -20
- package/packages/float/src/main.vue +642 -642
- package/packages/float/src/trigger.vue +31 -31
- package/packages/flow/index.js +8 -8
- package/packages/flow/src/flow.vue +234 -234
- package/packages/flow/src/flowItem.vue +61 -61
- package/packages/flow/src/flowLine.vue +168 -168
- package/packages/form/index.js +10 -10
- package/packages/form/src/form-item.vue +96 -96
- package/packages/form/src/form.vue +184 -184
- package/packages/grid/index.js +10 -10
- package/packages/grid/src/grid-item.vue +65 -65
- package/packages/grid/src/grid.vue +190 -190
- package/packages/grid-item/index.js +8 -8
- package/packages/guider/index.js +8 -8
- package/packages/guider/src/guider.vue +168 -168
- package/packages/header/index.js +8 -8
- package/packages/header/src/header.vue +111 -111
- package/packages/hide/index.js +8 -8
- package/packages/hide/src/directive.js +57 -57
- package/packages/icon/index.js +8 -8
- package/packages/icon/src/icon.vue +79 -79
- package/packages/import/index.js +8 -8
- package/packages/import/src/import.vue +279 -279
- package/packages/input/index.js +8 -8
- package/packages/input/src/calcTextareaHeight.js +104 -104
- package/packages/input/src/input.vue +653 -653
- package/packages/ip/index.js +8 -8
- package/packages/ip/src/ip.vue +143 -143
- package/packages/line/index.js +8 -8
- package/packages/line/src/line.vue +29 -29
- package/packages/loading/index.js +8 -8
- package/packages/loading/src/loading.js +58 -58
- package/packages/longtap/index.js +8 -8
- package/packages/longtap/src/longtap.js +95 -95
- package/packages/menu-icon/index.js +8 -8
- package/packages/menu-icon/src/menu-icon.vue +206 -206
- package/packages/message/index.js +8 -8
- package/packages/message/src/message.vue +9 -9
- package/packages/msg/index.js +8 -8
- package/packages/msg/src/msg.vue +227 -227
- package/packages/org/index.js +8 -8
- package/packages/org/src/org.vue +113 -113
- package/packages/org/src/orgItem.vue +63 -63
- package/packages/padding/index.js +8 -8
- package/packages/padding/src/padding.vue +105 -105
- package/packages/page/index.js +8 -8
- package/packages/page/src/page.vue +297 -297
- package/packages/param/index.js +8 -8
- package/packages/param/src/param.vue +226 -226
- package/packages/pic/index.js +8 -8
- package/packages/pic/src/pic-viewer.vue +331 -331
- package/packages/pic/src/pic.vue +144 -144
- package/packages/popup/index.js +12 -12
- package/packages/popup/src/popup-group.vue +47 -47
- package/packages/popup/src/popup-item.vue +163 -163
- package/packages/popup/src/popup.vue +350 -350
- package/packages/progress/index.js +8 -8
- package/packages/progress/src/progress.vue +306 -306
- package/packages/range/index.js +8 -8
- package/packages/range/src/range.vue +612 -612
- package/packages/rate/index.js +8 -8
- package/packages/rate/src/rate.vue +129 -129
- package/packages/reverser/index.js +8 -8
- package/packages/reverser/src/reverser.vue +49 -49
- package/packages/scroll/index.js +12 -12
- package/packages/scroll/src/scroll-point.vue +24 -24
- package/packages/scroll/src/scroll-sticky.vue +60 -60
- package/packages/scroll/src/scroll.vue +381 -381
- package/packages/segment/index.js +8 -8
- package/packages/segment/src/segment.vue +618 -618
- package/packages/select/index.js +8 -8
- package/packages/select/src/select.vue +1445 -1445
- package/packages/size/index.js +8 -8
- package/packages/size/src/directive.js +33 -33
- package/packages/skeleton/index.js +8 -8
- package/packages/skeleton/src/skeleton.vue +179 -179
- package/packages/slide/index.js +8 -8
- package/packages/slide/src/slide.vue +147 -147
- package/packages/space/index.js +8 -8
- package/packages/space/src/space.vue +53 -53
- package/packages/step/index.js +8 -8
- package/packages/step/src/step.vue +122 -122
- package/packages/submit/index.js +8 -8
- package/packages/submit/src/submit.vue +103 -103
- package/packages/switch/index.js +9 -9
- package/packages/switch/src/component.vue +131 -131
- package/packages/tab/index.js +10 -10
- package/packages/tab/src/tab-item.vue +85 -85
- package/packages/tab/src/tab.vue +590 -590
- package/packages/table/index.js +8 -8
- package/packages/table/src/table-body.vue +301 -301
- package/packages/table/src/table-config.vue +139 -139
- package/packages/table/src/table-head.vue +239 -239
- package/packages/table/src/table.vue +1455 -1458
- package/packages/tag/index.js +8 -8
- package/packages/tag/src/tag.vue +129 -129
- package/packages/theme/package.json +33 -33
- package/packages/theme/src/global/mixin.less +416 -416
- package/packages/theme/src/global/reset.less +27 -27
- package/packages/theme/src/less/component/affix.less +8 -8
- package/packages/theme/src/less/component/article-dark.less +6 -6
- package/packages/theme/src/less/component/article.less +39 -39
- package/packages/theme/src/less/component/box-dark.less +85 -85
- package/packages/theme/src/less/component/box.less +272 -272
- package/packages/theme/src/less/component/calendar-dark.less +111 -111
- package/packages/theme/src/less/component/calendar.less +282 -282
- package/packages/theme/src/less/component/card-dark.less +17 -17
- package/packages/theme/src/less/component/card.less +89 -89
- package/packages/theme/src/less/component/chat-dark.less +47 -47
- package/packages/theme/src/less/component/chat.less +71 -71
- package/packages/theme/src/less/component/code-dark.less +41 -41
- package/packages/theme/src/less/component/code.less +33 -33
- package/packages/theme/src/less/component/cover.less +4 -4
- package/packages/theme/src/less/component/dialog-dark.less +54 -54
- package/packages/theme/src/less/component/dialog.less +49 -49
- package/packages/theme/src/less/component/filter-dark.less +31 -31
- package/packages/theme/src/less/component/filter.less +97 -97
- package/packages/theme/src/less/component/float-dark.less +26 -26
- package/packages/theme/src/less/component/float.less +61 -61
- package/packages/theme/src/less/component/form-dark.less +45 -45
- package/packages/theme/src/less/component/form.less +322 -322
- package/packages/theme/src/less/component/gantt-dark.less +44 -44
- package/packages/theme/src/less/component/gantt.less +52 -52
- package/packages/theme/src/less/component/guider-dark.less +6 -6
- package/packages/theme/src/less/component/guider.less +15 -15
- package/packages/theme/src/less/component/header-dark.less +41 -41
- package/packages/theme/src/less/component/header.less +121 -121
- package/packages/theme/src/less/component/keyboard-dark.less +15 -15
- package/packages/theme/src/less/component/keyboard.less +21 -21
- package/packages/theme/src/less/component/line-dark.less +20 -20
- package/packages/theme/src/less/component/line.less +21 -21
- package/packages/theme/src/less/component/msg-dark.less +42 -42
- package/packages/theme/src/less/component/msg.less +102 -102
- package/packages/theme/src/less/component/page-dark.less +26 -26
- package/packages/theme/src/less/component/page.less +26 -26
- package/packages/theme/src/less/component/param-dark.less +31 -31
- package/packages/theme/src/less/component/param.less +136 -136
- package/packages/theme/src/less/component/popup-dark.less +20 -20
- package/packages/theme/src/less/component/popup.less +85 -85
- package/packages/theme/src/less/component/print.less +121 -121
- package/packages/theme/src/less/component/scroll-dark.less +19 -19
- package/packages/theme/src/less/component/scroll.less +47 -47
- package/packages/theme/src/less/component/skeleton-dark.less +29 -29
- package/packages/theme/src/less/component/skeleton.less +78 -78
- package/packages/theme/src/less/component/slide.less +70 -70
- package/packages/theme/src/less/component/space.less +2 -2
- package/packages/theme/src/less/component/step-dark.less +165 -165
- package/packages/theme/src/less/component/step.less +147 -147
- package/packages/theme/src/less/component/submit.less +40 -40
- package/packages/theme/src/less/component/tab-dark.less +221 -221
- package/packages/theme/src/less/component/tab.less +459 -459
- package/packages/theme/src/less/component/table-dark.less +196 -196
- package/packages/theme/src/less/component/table.less +425 -425
- package/packages/theme/src/less/component/timeline-dark.less +13 -13
- package/packages/theme/src/less/component/timeline.less +114 -114
- package/packages/theme/src/less/component/tip-dark.less +76 -76
- package/packages/theme/src/less/component/tip.less +139 -139
- package/packages/theme/src/less/component/tooltip-dark.less +105 -105
- package/packages/theme/src/less/component/tooltip.less +159 -159
- package/packages/theme/src/less/component/tree-dark.less +56 -56
- package/packages/theme/src/less/component/tree.less +148 -148
- package/packages/theme/src/less/element/align.less +32 -32
- package/packages/theme/src/less/element/animation.less +5 -5
- package/packages/theme/src/less/element/button-dark.less +29 -29
- package/packages/theme/src/less/element/button.less +65 -65
- package/packages/theme/src/less/element/center-scroll-dark.less +3 -3
- package/packages/theme/src/less/element/center-scroll.less +6 -6
- package/packages/theme/src/less/element/checkbox-dark.less +68 -68
- package/packages/theme/src/less/element/checkbox.less +73 -73
- package/packages/theme/src/less/element/color-dark.less +15 -15
- package/packages/theme/src/less/element/color.less +33 -33
- package/packages/theme/src/less/element/dis.less +9 -9
- package/packages/theme/src/less/element/ellipsis.less +35 -35
- package/packages/theme/src/less/element/emote.less +5 -5
- package/packages/theme/src/less/element/font-dark.less +9 -9
- package/packages/theme/src/less/element/font.less +8 -8
- package/packages/theme/src/less/element/hide-dark.less +114 -114
- package/packages/theme/src/less/element/hide.less +114 -114
- package/packages/theme/src/less/element/icon.less +297 -297
- package/packages/theme/src/less/element/input-dark.less +205 -205
- package/packages/theme/src/less/element/input.less +405 -405
- package/packages/theme/src/less/element/menu-icon.less +1 -1
- package/packages/theme/src/less/element/pic.less +18 -18
- package/packages/theme/src/less/element/progress-dark.less +37 -37
- package/packages/theme/src/less/element/progress.less +82 -82
- package/packages/theme/src/less/element/radio-dark.less +18 -18
- package/packages/theme/src/less/element/radio.less +11 -11
- package/packages/theme/src/less/element/range-dark.less +24 -24
- package/packages/theme/src/less/element/range.less +56 -56
- package/packages/theme/src/less/element/rate.less +17 -17
- package/packages/theme/src/less/element/segment-dark.less +119 -119
- package/packages/theme/src/less/element/segment.less +197 -197
- package/packages/theme/src/less/element/select-dark.less +167 -167
- package/packages/theme/src/less/element/select.less +431 -431
- package/packages/theme/src/less/element/size.less +10 -10
- package/packages/theme/src/less/element/switch-dark.less +7 -7
- package/packages/theme/src/less/element/switch.less +37 -37
- package/packages/theme/src/less/element/tag-dark.less +115 -115
- package/packages/theme/src/less/element/tag.less +159 -159
- package/packages/theme/src/less/element/upload-dark.less +26 -26
- package/packages/theme/src/less/element/upload.less +64 -64
- package/packages/theme/src/less/layout/fix.less +2 -2
- package/packages/theme/src/less/layout/flow.less +47 -47
- package/packages/theme/src/less/layout/grid-dark.less +28 -28
- package/packages/theme/src/less/layout/grid.less +172 -172
- package/packages/theme/src/less/layout/org-dark.less +2 -2
- package/packages/theme/src/less/layout/org.less +72 -72
- package/packages/theme/src/less/layout/padding.less +1 -1
- package/packages/theme/src/less/layout/reverser.less +8 -8
- package/packages/theme/src/less/theme/B-Design.less +159 -159
- package/packages/theme/src/less/theme/aiplan.less +159 -159
- package/packages/theme/src/less/theme/aiplangd.less +159 -159
- package/packages/theme/src/less/theme/chbn.less +159 -159
- package/packages/theme/src/less/theme/default.less +160 -160
- package/packages/theme/src/less/theme/dt.less +159 -159
- package/packages/theme/src/less/theme/ecloud.less +159 -159
- package/packages/theme/src/less/theme/hongkong.less +159 -159
- package/packages/theme/src/less/theme/narrow.less +160 -160
- package/packages/theme/src/less/theme/sdpf.less +160 -160
- package/packages/theme/src/less/theme/upc.less +159 -159
- package/packages/theme/src/less/theme/website.less +159 -159
- package/packages/theme/src/less/theme/zj.less +159 -159
- package/packages/timeline/index.js +8 -8
- package/packages/timeline/src/timeline.vue +84 -84
- package/packages/tip/index.js +8 -8
- package/packages/tip/src/tip.vue +226 -226
- package/packages/tooltip/index.js +8 -8
- package/packages/tooltip/src/directive.js +180 -180
- package/packages/tooltip/src/tooltip.vue +467 -467
- package/packages/transfer/index.js +8 -8
- package/packages/transfer/src/transfer.vue +293 -293
- package/packages/tree/index.js +8 -8
- package/packages/tree/src/tree.vue +518 -518
- package/packages/tree/src/treeItem.vue +443 -443
- package/packages/upload/index.js +8 -8
- package/packages/upload/src/upload.vue +860 -860
- package/src/index.js +207 -207
- package/src/locale/format.js +46 -46
- package/src/locale/index.js +48 -48
- package/src/locale/lang/en.js +207 -207
- package/src/locale/lang/zh-CN.js +207 -207
- package/src/mixins/blur.js +9 -9
- package/src/mixins/emitter.js +33 -33
- package/src/mixins/focus.js +9 -9
- package/src/mixins/locale.js +9 -9
- package/src/mixins/migrating.js +54 -54
- package/src/mixins/tip.js +10 -10
- package/src/mixins/transition.js +130 -130
- package/src/msg/index.js +107 -107
- package/src/svg/menu/main/abnormal-mix.svg +5 -5
- package/src/svg/menu/main/abnormal.svg +5 -5
- package/src/svg/menu/main/accountManager-mix.svg +5 -5
- package/src/svg/menu/main/accountManager.svg +5 -5
- package/src/svg/menu/main/agreement-mix.svg +7 -7
- package/src/svg/menu/main/agreement.svg +7 -7
- package/src/svg/menu/main/ai-mix.svg +5 -5
- package/src/svg/menu/main/archives-mix.svg +6 -6
- package/src/svg/menu/main/arrearsReport-mix.svg +17 -17
- package/src/svg/menu/main/arrearsReport.svg +17 -17
- package/src/svg/menu/main/bill-mix.svg +13 -13
- package/src/svg/menu/main/bill.svg +13 -13
- package/src/svg/menu/main/box-mix.svg +5 -5
- package/src/svg/menu/main/broadband-mix.svg +4 -4
- package/src/svg/menu/main/broadband.svg +4 -4
- package/src/svg/menu/main/card-mix.svg +5 -5
- package/src/svg/menu/main/card.svg +5 -5
- package/src/svg/menu/main/cash-mix.svg +5 -5
- package/src/svg/menu/main/cash.svg +5 -5
- package/src/svg/menu/main/cloud-mix.svg +4 -4
- package/src/svg/menu/main/cloud.svg +4 -4
- package/src/svg/menu/main/clue-mix.svg +10 -10
- package/src/svg/menu/main/clue.svg +10 -10
- package/src/svg/menu/main/commonUse-mix.svg +4 -4
- package/src/svg/menu/main/commonUse.svg +4 -4
- package/src/svg/menu/main/construction-mix.svg +7 -7
- package/src/svg/menu/main/construction.svg +7 -7
- package/src/svg/menu/main/contract-mix.svg +8 -8
- package/src/svg/menu/main/contract.svg +8 -8
- package/src/svg/menu/main/credit-mix.svg +5 -5
- package/src/svg/menu/main/credit.svg +5 -5
- package/src/svg/menu/main/data-mix.svg +5 -5
- package/src/svg/menu/main/data.svg +5 -5
- package/src/svg/menu/main/date-mix.svg +7 -7
- package/src/svg/menu/main/deposit-mix.svg +4 -4
- package/src/svg/menu/main/device-mix.svg +4 -4
- package/src/svg/menu/main/device.svg +4 -4
- package/src/svg/menu/main/discrepancy-mix.svg +5 -5
- package/src/svg/menu/main/door-mix.svg +6 -6
- package/src/svg/menu/main/fault-mix.svg +12 -12
- package/src/svg/menu/main/fault.svg +16 -16
- package/src/svg/menu/main/finance-mix.svg +11 -11
- package/src/svg/menu/main/finance.svg +13 -13
- package/src/svg/menu/main/flow-mix.svg +4 -4
- package/src/svg/menu/main/flow.svg +4 -4
- package/src/svg/menu/main/folder-mix.svg +4 -4
- package/src/svg/menu/main/folder.svg +4 -4
- package/src/svg/menu/main/friendly-mix.svg +5 -5
- package/src/svg/menu/main/fusion-mix.svg +5 -5
- package/src/svg/menu/main/fusion.svg +5 -5
- package/src/svg/menu/main/gift-mix.svg +8 -8
- package/src/svg/menu/main/gift.svg +8 -8
- package/src/svg/menu/main/gps-mix.svg +6 -6
- package/src/svg/menu/main/gps.svg +6 -6
- package/src/svg/menu/main/grid-mix.svg +7 -7
- package/src/svg/menu/main/grid.svg +7 -7
- package/src/svg/menu/main/group-mix.svg +4 -4
- package/src/svg/menu/main/group.svg +4 -4
- package/src/svg/menu/main/home-mix.svg +5 -5
- package/src/svg/menu/main/home.svg +8 -8
- package/src/svg/menu/main/ict-mix.svg +4 -4
- package/src/svg/menu/main/industry-mix.svg +5 -5
- package/src/svg/menu/main/industry.svg +5 -5
- package/src/svg/menu/main/info-mix.svg +9 -9
- package/src/svg/menu/main/info.svg +9 -9
- package/src/svg/menu/main/integral-mix.svg +5 -5
- package/src/svg/menu/main/integral.svg +5 -5
- package/src/svg/menu/main/internet-mix.svg +5 -5
- package/src/svg/menu/main/internet.svg +5 -5
- package/src/svg/menu/main/inventory-mix.svg +5 -5
- package/src/svg/menu/main/invoice-mix.svg +6 -6
- package/src/svg/menu/main/invoice.svg +14 -14
- package/src/svg/menu/main/iot-mix.svg +5 -5
- package/src/svg/menu/main/iot.svg +5 -5
- package/src/svg/menu/main/label-mix.svg +4 -4
- package/src/svg/menu/main/label.svg +4 -4
- package/src/svg/menu/main/love-mix.svg +6 -6
- package/src/svg/menu/main/love.svg +13 -13
- package/src/svg/menu/main/m1-mix.svg +4 -4
- package/src/svg/menu/main/m1.svg +4 -4
- package/src/svg/menu/main/m2-mix.svg +12 -12
- package/src/svg/menu/main/m2.svg +11 -11
- package/src/svg/menu/main/m3-mix.svg +6 -6
- package/src/svg/menu/main/m3.svg +7 -7
- package/src/svg/menu/main/m4-mix.svg +5 -5
- package/src/svg/menu/main/m4.svg +7 -7
- package/src/svg/menu/main/m5-mix.svg +8 -8
- package/src/svg/menu/main/m5.svg +10 -10
- package/src/svg/menu/main/mail-mix.svg +5 -5
- package/src/svg/menu/main/manual-mix.svg +11 -11
- package/src/svg/menu/main/manual.svg +11 -11
- package/src/svg/menu/main/market-mix.svg +4 -4
- package/src/svg/menu/main/market.svg +4 -4
- package/src/svg/menu/main/member-mix.svg +6 -6
- package/src/svg/menu/main/member.svg +6 -6
- package/src/svg/menu/main/menu-mix.svg +4 -4
- package/src/svg/menu/main/menu.svg +4 -4
- package/src/svg/menu/main/message-mix.svg +11 -11
- package/src/svg/menu/main/message.svg +11 -11
- package/src/svg/menu/main/namelist-mix.svg +4 -4
- package/src/svg/menu/main/namelist.svg +4 -4
- package/src/svg/menu/main/net-mix.svg +7 -7
- package/src/svg/menu/main/niche-mix.svg +12 -12
- package/src/svg/menu/main/niche.svg +12 -12
- package/src/svg/menu/main/notice-mix.svg +4 -4
- package/src/svg/menu/main/notice.svg +4 -4
- package/src/svg/menu/main/number-mix.svg +6 -6
- package/src/svg/menu/main/operations-mix.svg +4 -4
- package/src/svg/menu/main/operations.svg +4 -4
- package/src/svg/menu/main/order-mix.svg +8 -8
- package/src/svg/menu/main/order.svg +8 -8
- package/src/svg/menu/main/person-mix.svg +6 -6
- package/src/svg/menu/main/person.svg +6 -6
- package/src/svg/menu/main/phone-mix.svg +4 -4
- package/src/svg/menu/main/phone.svg +4 -4
- package/src/svg/menu/main/phoneBill-mix.svg +6 -6
- package/src/svg/menu/main/phoneBill.svg +6 -6
- package/src/svg/menu/main/preferential-mix.svg +5 -5
- package/src/svg/menu/main/preferential.svg +5 -5
- package/src/svg/menu/main/print-mix.svg +5 -5
- package/src/svg/menu/main/problem-mix.svg +4 -4
- package/src/svg/menu/main/problem.svg +4 -4
- package/src/svg/menu/main/process-mix.svg +4 -4
- package/src/svg/menu/main/process.svg +4 -4
- package/src/svg/menu/main/product-mix.svg +5 -5
- package/src/svg/menu/main/product.svg +6 -6
- package/src/svg/menu/main/qrCode-mix.svg +8 -8
- package/src/svg/menu/main/qrCode.svg +8 -8
- package/src/svg/menu/main/refuelingBag-mix-mix.svg +4 -4
- package/src/svg/menu/main/refuelingBag-mix.svg +4 -4
- package/src/svg/menu/main/reportForm-mix.svg +8 -8
- package/src/svg/menu/main/reportForm.svg +8 -8
- package/src/svg/menu/main/risk-mix.svg +16 -16
- package/src/svg/menu/main/risk.svg +17 -17
- package/src/svg/menu/main/robot-mix.svg +9 -9
- package/src/svg/menu/main/robot.svg +9 -9
- package/src/svg/menu/main/satisfaction-mix.svg +4 -4
- package/src/svg/menu/main/satisfaction.svg +4 -4
- package/src/svg/menu/main/scratchCard-mix.svg +4 -4
- package/src/svg/menu/main/sim-mix.svg +4 -4
- package/src/svg/menu/main/sim.svg +4 -4
- package/src/svg/menu/main/staging-mix.svg +4 -4
- package/src/svg/menu/main/staging.svg +4 -4
- package/src/svg/menu/main/survey-mix.svg +5 -5
- package/src/svg/menu/main/survey.svg +5 -5
- package/src/svg/menu/main/tasks-mix.svg +8 -8
- package/src/svg/menu/main/tasks.svg +8 -8
- package/src/svg/menu/main/telephone-mix.svg +4 -4
- package/src/svg/menu/main/topUp-mix.svg +5 -5
- package/src/svg/menu/main/trajectory-mix.svg +11 -11
- package/src/svg/menu/main/trajectory.svg +23 -23
- package/src/svg/menu/main/transmit-mix.svg +5 -5
- package/src/svg/menu/main/tv-mix.svg +6 -6
- package/src/svg/menu/main/unlock-mix.svg +4 -4
- package/src/svg/menu/main/unlock.svg +4 -4
- package/src/svg/menu/main/view-mix.svg +5 -5
- package/src/svg/menu/main/view.svg +5 -5
- package/src/svg/menu/main/visits-mix.svg +19 -19
- package/src/svg/menu/main/visits.svg +19 -19
- package/src/svg/menu/main/voice-mix.svg +4 -4
- package/src/svg/menu/main/voice.svg +4 -4
- package/src/svg/menu/main/wiki-mix.svg +4 -4
- package/src/svg/menu/main/wiki.svg +4 -4
- package/src/svg/menu/main/workOrder-mix.svg +6 -6
- package/src/svg/menu/main/workOrder.svg +14 -14
- package/src/svg/menu/patch/Mo-space.svg +2 -2
- package/src/svg/menu/patch/Mo.svg +3 -3
- package/src/svg/menu/patch/add-space.svg +3 -3
- package/src/svg/menu/patch/add.svg +3 -3
- package/src/svg/menu/patch/address-space.svg +3 -3
- package/src/svg/menu/patch/address.svg +3 -3
- package/src/svg/menu/patch/approve-space.svg +3 -3
- package/src/svg/menu/patch/approve.svg +4 -4
- package/src/svg/menu/patch/avoid-space.svg +3 -3
- package/src/svg/menu/patch/avoid.svg +3 -3
- package/src/svg/menu/patch/batch-space.svg +3 -3
- package/src/svg/menu/patch/batch.svg +5 -5
- package/src/svg/menu/patch/broadband-space.svg +3 -3
- package/src/svg/menu/patch/broadband.svg +4 -4
- package/src/svg/menu/patch/cancellation-space.svg +3 -3
- package/src/svg/menu/patch/cancellation.svg +3 -3
- package/src/svg/menu/patch/center-space.svg +3 -3
- package/src/svg/menu/patch/center.svg +5 -5
- package/src/svg/menu/patch/change-space.svg +3 -3
- package/src/svg/menu/patch/change.svg +4 -4
- package/src/svg/menu/patch/click-space.svg +3 -3
- package/src/svg/menu/patch/click.svg +4 -4
- package/src/svg/menu/patch/close-1-space.svg +3 -3
- package/src/svg/menu/patch/close-1.svg +3 -3
- package/src/svg/menu/patch/close-space.svg +2 -2
- package/src/svg/menu/patch/close.svg +3 -3
- package/src/svg/menu/patch/collect-space.svg +3 -3
- package/src/svg/menu/patch/collect.svg +3 -3
- package/src/svg/menu/patch/comment-space.svg +3 -3
- package/src/svg/menu/patch/comment.svg +3 -3
- package/src/svg/menu/patch/confirm-space.svg +3 -3
- package/src/svg/menu/patch/confirm.svg +3 -3
- package/src/svg/menu/patch/contract-space.svg +3 -3
- package/src/svg/menu/patch/contract.svg +3 -3
- package/src/svg/menu/patch/credit-space.svg +3 -3
- package/src/svg/menu/patch/credit.svg +5 -5
- package/src/svg/menu/patch/dataMonitoring-space.svg +3 -3
- package/src/svg/menu/patch/dataMonitoring.svg +3 -3
- package/src/svg/menu/patch/dedicatedCircuit-space.svg +3 -3
- package/src/svg/menu/patch/dedicatedCircuit.svg +3 -3
- package/src/svg/menu/patch/detail-space.svg +3 -3
- package/src/svg/menu/patch/detail.svg +3 -3
- package/src/svg/menu/patch/disassemb-space.svg +3 -3
- package/src/svg/menu/patch/disassemb.svg +3 -3
- package/src/svg/menu/patch/earnestMoney-space.svg +3 -3
- package/src/svg/menu/patch/earnestMoney.svg +3 -3
- package/src/svg/menu/patch/empower-space.svg +3 -3
- package/src/svg/menu/patch/empower.svg +3 -3
- package/src/svg/menu/patch/entrust-space.svg +3 -3
- package/src/svg/menu/patch/entrust.svg +3 -3
- package/src/svg/menu/patch/expedite-space.svg +4 -4
- package/src/svg/menu/patch/expedite.svg +4 -4
- package/src/svg/menu/patch/flow-space.svg +3 -3
- package/src/svg/menu/patch/flow.svg +3 -3
- package/src/svg/menu/patch/folder-space.svg +3 -3
- package/src/svg/menu/patch/folder.svg +3 -3
- package/src/svg/menu/patch/forbidden-space.svg +3 -3
- package/src/svg/menu/patch/forbidden.svg +3 -3
- package/src/svg/menu/patch/forward-space.svg +3 -3
- package/src/svg/menu/patch/forward.svg +3 -3
- package/src/svg/menu/patch/fusion-space.svg +3 -3
- package/src/svg/menu/patch/fusion.svg +6 -6
- package/src/svg/menu/patch/history-space.svg +3 -3
- package/src/svg/menu/patch/history.svg +3 -3
- package/src/svg/menu/patch/information-space.svg +3 -3
- package/src/svg/menu/patch/information.svg +3 -3
- package/src/svg/menu/patch/insert-space.svg +3 -3
- package/src/svg/menu/patch/insert.svg +3 -3
- package/src/svg/menu/patch/letv-space.svg +3 -3
- package/src/svg/menu/patch/letv.svg +3 -3
- package/src/svg/menu/patch/link-space.svg +3 -3
- package/src/svg/menu/patch/link.svg +3 -3
- package/src/svg/menu/patch/location-space.svg +3 -3
- package/src/svg/menu/patch/location.svg +3 -3
- package/src/svg/menu/patch/message-space.svg +3 -3
- package/src/svg/menu/patch/message.svg +4 -4
- package/src/svg/menu/patch/minus-space.svg +3 -3
- package/src/svg/menu/patch/minus.svg +3 -3
- package/src/svg/menu/patch/mms-space.svg +3 -3
- package/src/svg/menu/patch/mms.svg +3 -3
- package/src/svg/menu/patch/monitor-space.svg +3 -3
- package/src/svg/menu/patch/monitor.svg +3 -3
- package/src/svg/menu/patch/move-space.svg +3 -3
- package/src/svg/menu/patch/move.svg +3 -3
- package/src/svg/menu/patch/negative-space.svg +2 -2
- package/src/svg/menu/patch/negative.svg +3 -3
- package/src/svg/menu/patch/net-space.svg +2 -2
- package/src/svg/menu/patch/net.svg +3 -3
- package/src/svg/menu/patch/news-space.svg +3 -3
- package/src/svg/menu/patch/news.svg +3 -3
- package/src/svg/menu/patch/notice-space.svg +4 -4
- package/src/svg/menu/patch/notice.svg +5 -5
- package/src/svg/menu/patch/officialBusiness-space.svg +3 -3
- package/src/svg/menu/patch/officialBusiness.svg +4 -4
- package/src/svg/menu/patch/pay-space.svg +3 -3
- package/src/svg/menu/patch/pay.svg +3 -3
- package/src/svg/menu/patch/phone-space.svg +3 -3
- package/src/svg/menu/patch/phone.svg +5 -5
- package/src/svg/menu/patch/print-space.svg +3 -3
- package/src/svg/menu/patch/print.svg +5 -5
- package/src/svg/menu/patch/product-space.svg +3 -3
- package/src/svg/menu/patch/product.svg +5 -5
- package/src/svg/menu/patch/reservation-space.svg +3 -3
- package/src/svg/menu/patch/reservation.svg +3 -3
- package/src/svg/menu/patch/sale-space.svg +3 -3
- package/src/svg/menu/patch/sale.svg +5 -5
- package/src/svg/menu/patch/search-space.svg +3 -3
- package/src/svg/menu/patch/search.svg +3 -3
- package/src/svg/menu/patch/secure-space.svg +3 -3
- package/src/svg/menu/patch/secure.svg +5 -5
- package/src/svg/menu/patch/setup-space.svg +3 -3
- package/src/svg/menu/patch/setup.svg +3 -3
- package/src/svg/menu/patch/shift-space.svg +3 -3
- package/src/svg/menu/patch/shift.svg +3 -3
- package/src/svg/menu/patch/situation-space.svg +3 -3
- package/src/svg/menu/patch/situation.svg +3 -3
- package/src/svg/menu/patch/special-space.svg +3 -3
- package/src/svg/menu/patch/special.svg +3 -3
- package/src/svg/menu/patch/tabulation-space.svg +3 -3
- package/src/svg/menu/patch/tabulation.svg +8 -8
- package/src/svg/menu/patch/track-space.svg +3 -3
- package/src/svg/menu/patch/track.svg +5 -5
- package/src/svg/menu/patch/transaction-space.svg +3 -3
- package/src/svg/menu/patch/transaction.svg +6 -6
- package/src/svg/menu/patch/user-space.svg +3 -3
- package/src/svg/menu/patch/user.svg +3 -3
- package/src/svg/menu/patch/visualize-space.svg +3 -3
- package/src/svg/menu/patch/visualize.svg +4 -4
- package/src/svg/menu/patch/vnet-space.svg +3 -3
- package/src/svg/menu/patch/vnet.svg +3 -3
- package/src/tip/tip.js +160 -160
- package/src/utils/after-leave.js +27 -27
- package/src/utils/ajax.js +59 -59
- package/src/utils/array.js +24 -24
- package/src/utils/clickoutside.js +105 -105
- package/src/utils/compare.js +16 -16
- package/src/utils/date.js +34 -34
- package/src/utils/disabledArea.js +18 -18
- package/src/utils/dom.js +301 -301
- package/src/utils/filetransfer.js +287 -287
- package/src/utils/isModified.js +20 -20
- package/src/utils/jsencrypt/JSEncrypt.js +192 -192
- package/src/utils/jsencrypt/JSEncryptRSAKey.js +320 -320
- package/src/utils/jsencrypt/index.js +3 -3
- package/src/utils/jsencrypt/jselib/asn1js/asn1.d.ts +51 -51
- package/src/utils/jsencrypt/jselib/asn1js/asn1.js +565 -565
- package/src/utils/jsencrypt/jselib/asn1js/base64.d.ts +5 -5
- package/src/utils/jsencrypt/jselib/asn1js/base64.js +88 -88
- package/src/utils/jsencrypt/jselib/asn1js/hex.d.ts +3 -3
- package/src/utils/jsencrypt/jselib/asn1js/hex.js +64 -64
- package/src/utils/jsencrypt/jselib/asn1js/int10.d.ts +9 -9
- package/src/utils/jsencrypt/jselib/asn1js/int10.js +87 -87
- package/src/utils/jsencrypt/jselib/asn1js/oids.d.ts +9778 -9778
- package/src/utils/jsencrypt/jselib/asn1js/oids.js +1962 -1962
- package/src/utils/jsencrypt/jselib/jsbn/base64.d.ts +3 -3
- package/src/utils/jsencrypt/jselib/jsbn/base64.js +76 -76
- package/src/utils/jsencrypt/jselib/jsbn/jsbn.d.ts +98 -98
- package/src/utils/jsencrypt/jselib/jsbn/jsbn.js +1754 -1754
- package/src/utils/jsencrypt/jselib/jsbn/prng4.d.ts +10 -10
- package/src/utils/jsencrypt/jselib/jsbn/prng4.js +46 -46
- package/src/utils/jsencrypt/jselib/jsbn/rng.d.ts +3 -3
- package/src/utils/jsencrypt/jselib/jsbn/rng.js +78 -78
- package/src/utils/jsencrypt/jselib/jsbn/rsa.d.ts +23 -23
- package/src/utils/jsencrypt/jselib/jsbn/rsa.js +373 -373
- package/src/utils/jsencrypt/jselib/jsbn/util.d.ts +7 -7
- package/src/utils/jsencrypt/jselib/jsbn/util.js +58 -58
- package/src/utils/jsencrypt/jselib/jsrsasign/asn1-1.0.js +1593 -1593
- package/src/utils/jsencrypt/jselib/jsrsasign/yahoo.js +63 -63
- package/src/utils/jsencrypt/util.js +58 -58
- package/src/utils/jsencrypt.js +263 -263
- package/src/utils/md5.js +203 -203
- package/src/utils/merge.js +15 -15
- package/src/utils/mime.js +75 -75
- package/src/utils/print.js +39 -39
- package/src/utils/ratio.js +230 -230
- package/src/utils/respo.js +9 -9
- package/src/utils/shared.js +7 -7
- package/src/utils/sign.js +185 -185
- package/src/utils/string.js +13 -13
- package/src/utils/theme.js +91 -91
- package/src/utils/types.js +40 -40
- package/src/utils/util.js +286 -286
- package/src/utils/uuid.js +12 -12
- package/src/utils/validate.js +373 -373
- package/packages/.DS_Store +0 -0
- package/packages/article/.DS_Store +0 -0
- package/packages/chat/.DS_Store +0 -0
- package/packages/chat/src/.DS_Store +0 -0
- package/packages/date-picker/.DS_Store +0 -0
- package/packages/dis/.DS_Store +0 -0
- package/packages/emote/.DS_Store +0 -0
- package/packages/filter/.DS_Store +0 -0
- package/packages/filter/src/.DS_Store +0 -0
- package/packages/float/.DS_Store +0 -0
- package/packages/flow/.DS_Store +0 -0
- package/packages/guider/.DS_Store +0 -0
- package/packages/ip/.DS_Store +0 -0
- package/packages/org/.DS_Store +0 -0
- package/packages/page/.DS_Store +0 -0
- package/packages/page/src/.DS_Store +0 -0
- package/packages/pic/.DS_Store +0 -0
- package/packages/rate/.DS_Store +0 -0
- package/packages/reverser/.DS_Store +0 -0
- package/packages/reverser/src/.DS_Store +0 -0
- package/packages/segment/.DS_Store +0 -0
- package/packages/slide/.DS_Store +0 -0
- package/packages/tab/.DS_Store +0 -0
- package/packages/table/.DS_Store +0 -0
- package/packages/theme/src/.DS_Store +0 -0
- package/packages/theme/src/img/.DS_Store +0 -0
- package/packages/theme/src/img/emote/.DS_Store +0 -0
- package/packages/theme/src/less/.DS_Store +0 -0
- package/packages/theme/src/less/theme/.DS_Store +0 -0
- package/packages/tooltip/.DS_Store +0 -0
- package/packages/tree/.DS_Store +0 -0
- package/packages/upload/.DS_Store +0 -0
- package/src/.DS_Store +0 -0
- package/src/svg/.DS_Store +0 -0
- package/src/svg/menu/.DS_Store +0 -0
|
@@ -7,98 +7,98 @@ var _jsbn = require("../jsbn/jsbn");
|
|
|
7
7
|
|
|
8
8
|
var _yahoo = require("./yahoo");
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* @fileOverview
|
|
12
|
-
* @name asn1-1.0.js
|
|
13
|
-
* @author Kenji Urushima kenji.urushima@gmail.com
|
|
14
|
-
* @version asn1 1.0.13 (2017-Jun-02)
|
|
15
|
-
* @since jsrsasign 2.1
|
|
16
|
-
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
10
|
+
/**
|
|
11
|
+
* @fileOverview
|
|
12
|
+
* @name asn1-1.0.js
|
|
13
|
+
* @author Kenji Urushima kenji.urushima@gmail.com
|
|
14
|
+
* @version asn1 1.0.13 (2017-Jun-02)
|
|
15
|
+
* @since jsrsasign 2.1
|
|
16
|
+
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
17
17
|
*/
|
|
18
|
-
/**
|
|
19
|
-
* kjur's class library name space
|
|
20
|
-
* <p>
|
|
21
|
-
* This name space provides following name spaces:
|
|
22
|
-
* <ul>
|
|
23
|
-
* <li>{@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder</li>
|
|
24
|
-
* <li>{@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL</li>
|
|
25
|
-
* <li>{@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature
|
|
26
|
-
* class and utilities</li>
|
|
27
|
-
* </ul>
|
|
28
|
-
* </p>
|
|
29
|
-
* NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.
|
|
30
|
-
* @name KJUR
|
|
31
|
-
* @namespace kjur's class library name space
|
|
18
|
+
/**
|
|
19
|
+
* kjur's class library name space
|
|
20
|
+
* <p>
|
|
21
|
+
* This name space provides following name spaces:
|
|
22
|
+
* <ul>
|
|
23
|
+
* <li>{@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder</li>
|
|
24
|
+
* <li>{@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL</li>
|
|
25
|
+
* <li>{@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature
|
|
26
|
+
* class and utilities</li>
|
|
27
|
+
* </ul>
|
|
28
|
+
* </p>
|
|
29
|
+
* NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.
|
|
30
|
+
* @name KJUR
|
|
31
|
+
* @namespace kjur's class library name space
|
|
32
32
|
*/
|
|
33
|
-
/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license
|
|
33
|
+
/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license
|
|
34
34
|
*/
|
|
35
|
-
/*
|
|
36
|
-
* asn1.js - ASN.1 DER encoder classes
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)
|
|
39
|
-
*
|
|
40
|
-
* This software is licensed under the terms of the MIT License.
|
|
41
|
-
* https://kjur.github.io/jsrsasign/license
|
|
42
|
-
*
|
|
43
|
-
* The above copyright and license notice shall be
|
|
44
|
-
* included in all copies or substantial portions of the Software.
|
|
35
|
+
/*
|
|
36
|
+
* asn1.js - ASN.1 DER encoder classes
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)
|
|
39
|
+
*
|
|
40
|
+
* This software is licensed under the terms of the MIT License.
|
|
41
|
+
* https://kjur.github.io/jsrsasign/license
|
|
42
|
+
*
|
|
43
|
+
* The above copyright and license notice shall be
|
|
44
|
+
* included in all copies or substantial portions of the Software.
|
|
45
45
|
*/
|
|
46
46
|
var KJUR = exports.KJUR = {};
|
|
47
|
-
/**
|
|
48
|
-
* kjur's ASN.1 class library name space
|
|
49
|
-
* <p>
|
|
50
|
-
* This is ITU-T X.690 ASN.1 DER encoder class library and
|
|
51
|
-
* class structure and methods is very similar to
|
|
52
|
-
* org.bouncycastle.asn1 package of
|
|
53
|
-
* well known BouncyCaslte Cryptography Library.
|
|
54
|
-
* <h4>PROVIDING ASN.1 PRIMITIVES</h4>
|
|
55
|
-
* Here are ASN.1 DER primitive classes.
|
|
56
|
-
* <ul>
|
|
57
|
-
* <li>0x01 {@link KJUR.asn1.DERBoolean}</li>
|
|
58
|
-
* <li>0x02 {@link KJUR.asn1.DERInteger}</li>
|
|
59
|
-
* <li>0x03 {@link KJUR.asn1.DERBitString}</li>
|
|
60
|
-
* <li>0x04 {@link KJUR.asn1.DEROctetString}</li>
|
|
61
|
-
* <li>0x05 {@link KJUR.asn1.DERNull}</li>
|
|
62
|
-
* <li>0x06 {@link KJUR.asn1.DERObjectIdentifier}</li>
|
|
63
|
-
* <li>0x0a {@link KJUR.asn1.DEREnumerated}</li>
|
|
64
|
-
* <li>0x0c {@link KJUR.asn1.DERUTF8String}</li>
|
|
65
|
-
* <li>0x12 {@link KJUR.asn1.DERNumericString}</li>
|
|
66
|
-
* <li>0x13 {@link KJUR.asn1.DERPrintableString}</li>
|
|
67
|
-
* <li>0x14 {@link KJUR.asn1.DERTeletexString}</li>
|
|
68
|
-
* <li>0x16 {@link KJUR.asn1.DERIA5String}</li>
|
|
69
|
-
* <li>0x17 {@link KJUR.asn1.DERUTCTime}</li>
|
|
70
|
-
* <li>0x18 {@link KJUR.asn1.DERGeneralizedTime}</li>
|
|
71
|
-
* <li>0x30 {@link KJUR.asn1.DERSequence}</li>
|
|
72
|
-
* <li>0x31 {@link KJUR.asn1.DERSet}</li>
|
|
73
|
-
* </ul>
|
|
74
|
-
* <h4>OTHER ASN.1 CLASSES</h4>
|
|
75
|
-
* <ul>
|
|
76
|
-
* <li>{@link KJUR.asn1.ASN1Object}</li>
|
|
77
|
-
* <li>{@link KJUR.asn1.DERAbstractString}</li>
|
|
78
|
-
* <li>{@link KJUR.asn1.DERAbstractTime}</li>
|
|
79
|
-
* <li>{@link KJUR.asn1.DERAbstractStructured}</li>
|
|
80
|
-
* <li>{@link KJUR.asn1.DERTaggedObject}</li>
|
|
81
|
-
* </ul>
|
|
82
|
-
* <h4>SUB NAME SPACES</h4>
|
|
83
|
-
* <ul>
|
|
84
|
-
* <li>{@link KJUR.asn1.cades} - CAdES long term signature format</li>
|
|
85
|
-
* <li>{@link KJUR.asn1.cms} - Cryptographic Message Syntax</li>
|
|
86
|
-
* <li>{@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)</li>
|
|
87
|
-
* <li>{@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format</li>
|
|
88
|
-
* <li>{@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL</li>
|
|
89
|
-
* </ul>
|
|
90
|
-
* </p>
|
|
91
|
-
* NOTE: Please ignore method summary and document of this namespace.
|
|
92
|
-
* This caused by a bug of jsdoc2.
|
|
93
|
-
* @name KJUR.asn1
|
|
94
|
-
* @namespace
|
|
47
|
+
/**
|
|
48
|
+
* kjur's ASN.1 class library name space
|
|
49
|
+
* <p>
|
|
50
|
+
* This is ITU-T X.690 ASN.1 DER encoder class library and
|
|
51
|
+
* class structure and methods is very similar to
|
|
52
|
+
* org.bouncycastle.asn1 package of
|
|
53
|
+
* well known BouncyCaslte Cryptography Library.
|
|
54
|
+
* <h4>PROVIDING ASN.1 PRIMITIVES</h4>
|
|
55
|
+
* Here are ASN.1 DER primitive classes.
|
|
56
|
+
* <ul>
|
|
57
|
+
* <li>0x01 {@link KJUR.asn1.DERBoolean}</li>
|
|
58
|
+
* <li>0x02 {@link KJUR.asn1.DERInteger}</li>
|
|
59
|
+
* <li>0x03 {@link KJUR.asn1.DERBitString}</li>
|
|
60
|
+
* <li>0x04 {@link KJUR.asn1.DEROctetString}</li>
|
|
61
|
+
* <li>0x05 {@link KJUR.asn1.DERNull}</li>
|
|
62
|
+
* <li>0x06 {@link KJUR.asn1.DERObjectIdentifier}</li>
|
|
63
|
+
* <li>0x0a {@link KJUR.asn1.DEREnumerated}</li>
|
|
64
|
+
* <li>0x0c {@link KJUR.asn1.DERUTF8String}</li>
|
|
65
|
+
* <li>0x12 {@link KJUR.asn1.DERNumericString}</li>
|
|
66
|
+
* <li>0x13 {@link KJUR.asn1.DERPrintableString}</li>
|
|
67
|
+
* <li>0x14 {@link KJUR.asn1.DERTeletexString}</li>
|
|
68
|
+
* <li>0x16 {@link KJUR.asn1.DERIA5String}</li>
|
|
69
|
+
* <li>0x17 {@link KJUR.asn1.DERUTCTime}</li>
|
|
70
|
+
* <li>0x18 {@link KJUR.asn1.DERGeneralizedTime}</li>
|
|
71
|
+
* <li>0x30 {@link KJUR.asn1.DERSequence}</li>
|
|
72
|
+
* <li>0x31 {@link KJUR.asn1.DERSet}</li>
|
|
73
|
+
* </ul>
|
|
74
|
+
* <h4>OTHER ASN.1 CLASSES</h4>
|
|
75
|
+
* <ul>
|
|
76
|
+
* <li>{@link KJUR.asn1.ASN1Object}</li>
|
|
77
|
+
* <li>{@link KJUR.asn1.DERAbstractString}</li>
|
|
78
|
+
* <li>{@link KJUR.asn1.DERAbstractTime}</li>
|
|
79
|
+
* <li>{@link KJUR.asn1.DERAbstractStructured}</li>
|
|
80
|
+
* <li>{@link KJUR.asn1.DERTaggedObject}</li>
|
|
81
|
+
* </ul>
|
|
82
|
+
* <h4>SUB NAME SPACES</h4>
|
|
83
|
+
* <ul>
|
|
84
|
+
* <li>{@link KJUR.asn1.cades} - CAdES long term signature format</li>
|
|
85
|
+
* <li>{@link KJUR.asn1.cms} - Cryptographic Message Syntax</li>
|
|
86
|
+
* <li>{@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)</li>
|
|
87
|
+
* <li>{@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format</li>
|
|
88
|
+
* <li>{@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL</li>
|
|
89
|
+
* </ul>
|
|
90
|
+
* </p>
|
|
91
|
+
* NOTE: Please ignore method summary and document of this namespace.
|
|
92
|
+
* This caused by a bug of jsdoc2.
|
|
93
|
+
* @name KJUR.asn1
|
|
94
|
+
* @namespace
|
|
95
95
|
*/
|
|
96
96
|
if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1) KJUR.asn1 = {};
|
|
97
|
-
/**
|
|
98
|
-
* ASN1 utilities class
|
|
99
|
-
* @name KJUR.asn1.ASN1Util
|
|
100
|
-
* @class ASN1 utilities class
|
|
101
|
-
* @since asn1 1.0.2
|
|
97
|
+
/**
|
|
98
|
+
* ASN1 utilities class
|
|
99
|
+
* @name KJUR.asn1.ASN1Util
|
|
100
|
+
* @class ASN1 utilities class
|
|
101
|
+
* @since asn1 1.0.2
|
|
102
102
|
*/
|
|
103
103
|
KJUR.asn1.ASN1Util = new function () {
|
|
104
104
|
this.integerToByteHex = function (i) {
|
|
@@ -136,76 +136,76 @@ KJUR.asn1.ASN1Util = new function () {
|
|
|
136
136
|
}
|
|
137
137
|
return h;
|
|
138
138
|
};
|
|
139
|
-
/**
|
|
140
|
-
* get PEM string from hexadecimal data and header string
|
|
141
|
-
* @name getPEMStringFromHex
|
|
142
|
-
* @memberOf KJUR.asn1.ASN1Util
|
|
143
|
-
* @function
|
|
144
|
-
* @param {String} dataHex hexadecimal string of PEM body
|
|
145
|
-
* @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')
|
|
146
|
-
* @return {String} PEM formatted string of input data
|
|
147
|
-
* @description
|
|
148
|
-
* This method converts a hexadecimal string to a PEM string with
|
|
149
|
-
* a specified header. Its line break will be CRLF("\r\n").
|
|
150
|
-
* @example
|
|
151
|
-
* var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');
|
|
152
|
-
* // value of pem will be:
|
|
153
|
-
* -----BEGIN PRIVATE KEY-----
|
|
154
|
-
* YWFh
|
|
155
|
-
* -----END PRIVATE KEY-----
|
|
139
|
+
/**
|
|
140
|
+
* get PEM string from hexadecimal data and header string
|
|
141
|
+
* @name getPEMStringFromHex
|
|
142
|
+
* @memberOf KJUR.asn1.ASN1Util
|
|
143
|
+
* @function
|
|
144
|
+
* @param {String} dataHex hexadecimal string of PEM body
|
|
145
|
+
* @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')
|
|
146
|
+
* @return {String} PEM formatted string of input data
|
|
147
|
+
* @description
|
|
148
|
+
* This method converts a hexadecimal string to a PEM string with
|
|
149
|
+
* a specified header. Its line break will be CRLF("\r\n").
|
|
150
|
+
* @example
|
|
151
|
+
* var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');
|
|
152
|
+
* // value of pem will be:
|
|
153
|
+
* -----BEGIN PRIVATE KEY-----
|
|
154
|
+
* YWFh
|
|
155
|
+
* -----END PRIVATE KEY-----
|
|
156
156
|
*/
|
|
157
157
|
this.getPEMStringFromHex = function (dataHex, pemHeader) {
|
|
158
158
|
return hextopem(dataHex, pemHeader);
|
|
159
159
|
};
|
|
160
|
-
/**
|
|
161
|
-
* generate ASN1Object specifed by JSON parameters
|
|
162
|
-
* @name newObject
|
|
163
|
-
* @memberOf KJUR.asn1.ASN1Util
|
|
164
|
-
* @function
|
|
165
|
-
* @param {Array} param JSON parameter to generate ASN1Object
|
|
166
|
-
* @return {KJUR.asn1.ASN1Object} generated object
|
|
167
|
-
* @since asn1 1.0.3
|
|
168
|
-
* @description
|
|
169
|
-
* generate any ASN1Object specified by JSON param
|
|
170
|
-
* including ASN.1 primitive or structured.
|
|
171
|
-
* Generally 'param' can be described as follows:
|
|
172
|
-
* <blockquote>
|
|
173
|
-
* {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}
|
|
174
|
-
* </blockquote>
|
|
175
|
-
* 'TYPE-OF-ASN1OBJ' can be one of following symbols:
|
|
176
|
-
* <ul>
|
|
177
|
-
* <li>'bool' - DERBoolean</li>
|
|
178
|
-
* <li>'int' - DERInteger</li>
|
|
179
|
-
* <li>'bitstr' - DERBitString</li>
|
|
180
|
-
* <li>'octstr' - DEROctetString</li>
|
|
181
|
-
* <li>'null' - DERNull</li>
|
|
182
|
-
* <li>'oid' - DERObjectIdentifier</li>
|
|
183
|
-
* <li>'enum' - DEREnumerated</li>
|
|
184
|
-
* <li>'utf8str' - DERUTF8String</li>
|
|
185
|
-
* <li>'numstr' - DERNumericString</li>
|
|
186
|
-
* <li>'prnstr' - DERPrintableString</li>
|
|
187
|
-
* <li>'telstr' - DERTeletexString</li>
|
|
188
|
-
* <li>'ia5str' - DERIA5String</li>
|
|
189
|
-
* <li>'utctime' - DERUTCTime</li>
|
|
190
|
-
* <li>'gentime' - DERGeneralizedTime</li>
|
|
191
|
-
* <li>'seq' - DERSequence</li>
|
|
192
|
-
* <li>'set' - DERSet</li>
|
|
193
|
-
* <li>'tag' - DERTaggedObject</li>
|
|
194
|
-
* </ul>
|
|
195
|
-
* @example
|
|
196
|
-
* newObject({'prnstr': 'aaa'});
|
|
197
|
-
* newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})
|
|
198
|
-
* // ASN.1 Tagged Object
|
|
199
|
-
* newObject({'tag': {'tag': 'a1',
|
|
200
|
-
* 'explicit': true,
|
|
201
|
-
* 'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});
|
|
202
|
-
* // more simple representation of ASN.1 Tagged Object
|
|
203
|
-
* newObject({'tag': ['a1',
|
|
204
|
-
* true,
|
|
205
|
-
* {'seq': [
|
|
206
|
-
* {'int': 3},
|
|
207
|
-
* {'prnstr': 'aaa'}]}
|
|
208
|
-
* ]});
|
|
160
|
+
/**
|
|
161
|
+
* generate ASN1Object specifed by JSON parameters
|
|
162
|
+
* @name newObject
|
|
163
|
+
* @memberOf KJUR.asn1.ASN1Util
|
|
164
|
+
* @function
|
|
165
|
+
* @param {Array} param JSON parameter to generate ASN1Object
|
|
166
|
+
* @return {KJUR.asn1.ASN1Object} generated object
|
|
167
|
+
* @since asn1 1.0.3
|
|
168
|
+
* @description
|
|
169
|
+
* generate any ASN1Object specified by JSON param
|
|
170
|
+
* including ASN.1 primitive or structured.
|
|
171
|
+
* Generally 'param' can be described as follows:
|
|
172
|
+
* <blockquote>
|
|
173
|
+
* {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}
|
|
174
|
+
* </blockquote>
|
|
175
|
+
* 'TYPE-OF-ASN1OBJ' can be one of following symbols:
|
|
176
|
+
* <ul>
|
|
177
|
+
* <li>'bool' - DERBoolean</li>
|
|
178
|
+
* <li>'int' - DERInteger</li>
|
|
179
|
+
* <li>'bitstr' - DERBitString</li>
|
|
180
|
+
* <li>'octstr' - DEROctetString</li>
|
|
181
|
+
* <li>'null' - DERNull</li>
|
|
182
|
+
* <li>'oid' - DERObjectIdentifier</li>
|
|
183
|
+
* <li>'enum' - DEREnumerated</li>
|
|
184
|
+
* <li>'utf8str' - DERUTF8String</li>
|
|
185
|
+
* <li>'numstr' - DERNumericString</li>
|
|
186
|
+
* <li>'prnstr' - DERPrintableString</li>
|
|
187
|
+
* <li>'telstr' - DERTeletexString</li>
|
|
188
|
+
* <li>'ia5str' - DERIA5String</li>
|
|
189
|
+
* <li>'utctime' - DERUTCTime</li>
|
|
190
|
+
* <li>'gentime' - DERGeneralizedTime</li>
|
|
191
|
+
* <li>'seq' - DERSequence</li>
|
|
192
|
+
* <li>'set' - DERSet</li>
|
|
193
|
+
* <li>'tag' - DERTaggedObject</li>
|
|
194
|
+
* </ul>
|
|
195
|
+
* @example
|
|
196
|
+
* newObject({'prnstr': 'aaa'});
|
|
197
|
+
* newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})
|
|
198
|
+
* // ASN.1 Tagged Object
|
|
199
|
+
* newObject({'tag': {'tag': 'a1',
|
|
200
|
+
* 'explicit': true,
|
|
201
|
+
* 'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});
|
|
202
|
+
* // more simple representation of ASN.1 Tagged Object
|
|
203
|
+
* newObject({'tag': ['a1',
|
|
204
|
+
* true,
|
|
205
|
+
* {'seq': [
|
|
206
|
+
* {'int': 3},
|
|
207
|
+
* {'prnstr': 'aaa'}]}
|
|
208
|
+
* ]});
|
|
209
209
|
*/
|
|
210
210
|
this.newObject = function (param) {
|
|
211
211
|
var _KJUR = KJUR,
|
|
@@ -281,38 +281,38 @@ KJUR.asn1.ASN1Util = new function () {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
|
-
/**
|
|
285
|
-
* get encoded hexadecimal string of ASN1Object specifed by JSON parameters
|
|
286
|
-
* @name jsonToASN1HEX
|
|
287
|
-
* @memberOf KJUR.asn1.ASN1Util
|
|
288
|
-
* @function
|
|
289
|
-
* @param {Array} param JSON parameter to generate ASN1Object
|
|
290
|
-
* @return hexadecimal string of ASN1Object
|
|
291
|
-
* @since asn1 1.0.4
|
|
292
|
-
* @description
|
|
293
|
-
* As for ASN.1 object representation of JSON object,
|
|
294
|
-
* please see {@link newObject}.
|
|
295
|
-
* @example
|
|
296
|
-
* jsonToASN1HEX({'prnstr': 'aaa'});
|
|
284
|
+
/**
|
|
285
|
+
* get encoded hexadecimal string of ASN1Object specifed by JSON parameters
|
|
286
|
+
* @name jsonToASN1HEX
|
|
287
|
+
* @memberOf KJUR.asn1.ASN1Util
|
|
288
|
+
* @function
|
|
289
|
+
* @param {Array} param JSON parameter to generate ASN1Object
|
|
290
|
+
* @return hexadecimal string of ASN1Object
|
|
291
|
+
* @since asn1 1.0.4
|
|
292
|
+
* @description
|
|
293
|
+
* As for ASN.1 object representation of JSON object,
|
|
294
|
+
* please see {@link newObject}.
|
|
295
|
+
* @example
|
|
296
|
+
* jsonToASN1HEX({'prnstr': 'aaa'});
|
|
297
297
|
*/
|
|
298
298
|
this.jsonToASN1HEX = function (param) {
|
|
299
299
|
var asn1Obj = this.newObject(param);
|
|
300
300
|
return asn1Obj.getEncodedHex();
|
|
301
301
|
};
|
|
302
302
|
}();
|
|
303
|
-
/**
|
|
304
|
-
* get dot noted oid number string from hexadecimal value of OID
|
|
305
|
-
* @name oidHexToInt
|
|
306
|
-
* @memberOf KJUR.asn1.ASN1Util
|
|
307
|
-
* @function
|
|
308
|
-
* @param {String} hex hexadecimal value of object identifier
|
|
309
|
-
* @return {String} dot noted string of object identifier
|
|
310
|
-
* @since jsrsasign 4.8.3 asn1 1.0.7
|
|
311
|
-
* @description
|
|
312
|
-
* This static method converts from hexadecimal string representation of
|
|
313
|
-
* ASN.1 value of object identifier to oid number string.
|
|
314
|
-
* @example
|
|
315
|
-
* KJUR.asn1.ASN1Util.oidHexToInt('550406') → "2.5.4.6"
|
|
303
|
+
/**
|
|
304
|
+
* get dot noted oid number string from hexadecimal value of OID
|
|
305
|
+
* @name oidHexToInt
|
|
306
|
+
* @memberOf KJUR.asn1.ASN1Util
|
|
307
|
+
* @function
|
|
308
|
+
* @param {String} hex hexadecimal value of object identifier
|
|
309
|
+
* @return {String} dot noted string of object identifier
|
|
310
|
+
* @since jsrsasign 4.8.3 asn1 1.0.7
|
|
311
|
+
* @description
|
|
312
|
+
* This static method converts from hexadecimal string representation of
|
|
313
|
+
* ASN.1 value of object identifier to oid number string.
|
|
314
|
+
* @example
|
|
315
|
+
* KJUR.asn1.ASN1Util.oidHexToInt('550406') → "2.5.4.6"
|
|
316
316
|
*/
|
|
317
317
|
KJUR.asn1.ASN1Util.oidHexToInt = function (hex) {
|
|
318
318
|
var s = "";
|
|
@@ -334,19 +334,19 @@ KJUR.asn1.ASN1Util.oidHexToInt = function (hex) {
|
|
|
334
334
|
;
|
|
335
335
|
return s;
|
|
336
336
|
};
|
|
337
|
-
/**
|
|
338
|
-
* get hexadecimal value of object identifier from dot noted oid value
|
|
339
|
-
* @name oidIntToHex
|
|
340
|
-
* @memberOf KJUR.asn1.ASN1Util
|
|
341
|
-
* @function
|
|
342
|
-
* @param {String} oidString dot noted string of object identifier
|
|
343
|
-
* @return {String} hexadecimal value of object identifier
|
|
344
|
-
* @since jsrsasign 4.8.3 asn1 1.0.7
|
|
345
|
-
* @description
|
|
346
|
-
* This static method converts from object identifier value string.
|
|
347
|
-
* to hexadecimal string representation of it.
|
|
348
|
-
* @example
|
|
349
|
-
* KJUR.asn1.ASN1Util.oidIntToHex("2.5.4.6") → "550406"
|
|
337
|
+
/**
|
|
338
|
+
* get hexadecimal value of object identifier from dot noted oid value
|
|
339
|
+
* @name oidIntToHex
|
|
340
|
+
* @memberOf KJUR.asn1.ASN1Util
|
|
341
|
+
* @function
|
|
342
|
+
* @param {String} oidString dot noted string of object identifier
|
|
343
|
+
* @return {String} hexadecimal value of object identifier
|
|
344
|
+
* @since jsrsasign 4.8.3 asn1 1.0.7
|
|
345
|
+
* @description
|
|
346
|
+
* This static method converts from object identifier value string.
|
|
347
|
+
* to hexadecimal string representation of it.
|
|
348
|
+
* @example
|
|
349
|
+
* KJUR.asn1.ASN1Util.oidIntToHex("2.5.4.6") → "550406"
|
|
350
350
|
*/
|
|
351
351
|
KJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {
|
|
352
352
|
var itox = function itox(i) {
|
|
@@ -388,16 +388,16 @@ KJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {
|
|
|
388
388
|
// Abstract ASN.1 Classes
|
|
389
389
|
// ********************************************************************
|
|
390
390
|
// ********************************************************************
|
|
391
|
-
/**
|
|
392
|
-
* base class for ASN.1 DER encoder object
|
|
393
|
-
* @name KJUR.asn1.ASN1Object
|
|
394
|
-
* @class base class for ASN.1 DER encoder object
|
|
395
|
-
* @property {Boolean} isModified flag whether internal data was changed
|
|
396
|
-
* @property {String} hTLV hexadecimal string of ASN.1 TLV
|
|
397
|
-
* @property {String} hT hexadecimal string of ASN.1 TLV tag(T)
|
|
398
|
-
* @property {String} hL hexadecimal string of ASN.1 TLV length(L)
|
|
399
|
-
* @property {String} hV hexadecimal string of ASN.1 TLV value(V)
|
|
400
|
-
* @description
|
|
391
|
+
/**
|
|
392
|
+
* base class for ASN.1 DER encoder object
|
|
393
|
+
* @name KJUR.asn1.ASN1Object
|
|
394
|
+
* @class base class for ASN.1 DER encoder object
|
|
395
|
+
* @property {Boolean} isModified flag whether internal data was changed
|
|
396
|
+
* @property {String} hTLV hexadecimal string of ASN.1 TLV
|
|
397
|
+
* @property {String} hT hexadecimal string of ASN.1 TLV tag(T)
|
|
398
|
+
* @property {String} hL hexadecimal string of ASN.1 TLV length(L)
|
|
399
|
+
* @property {String} hV hexadecimal string of ASN.1 TLV value(V)
|
|
400
|
+
* @description
|
|
401
401
|
*/
|
|
402
402
|
KJUR.asn1.ASN1Object = function () {
|
|
403
403
|
var isModified = true;
|
|
@@ -405,12 +405,12 @@ KJUR.asn1.ASN1Object = function () {
|
|
|
405
405
|
var hT = '00';
|
|
406
406
|
var hL = '00';
|
|
407
407
|
var hV = '';
|
|
408
|
-
/**
|
|
409
|
-
* get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)
|
|
410
|
-
* @name getLengthHexFromValue
|
|
411
|
-
* @memberOf KJUR.asn1.ASN1Object#
|
|
412
|
-
* @function
|
|
413
|
-
* @return {String} hexadecimal string of ASN.1 TLV length(L)
|
|
408
|
+
/**
|
|
409
|
+
* get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)
|
|
410
|
+
* @name getLengthHexFromValue
|
|
411
|
+
* @memberOf KJUR.asn1.ASN1Object#
|
|
412
|
+
* @function
|
|
413
|
+
* @return {String} hexadecimal string of ASN.1 TLV length(L)
|
|
414
414
|
*/
|
|
415
415
|
this.getLengthHexFromValue = function () {
|
|
416
416
|
if (typeof this.hV == "undefined" || this.hV == null) {
|
|
@@ -435,12 +435,12 @@ KJUR.asn1.ASN1Object = function () {
|
|
|
435
435
|
return head.toString(16) + hN;
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
|
-
/**
|
|
439
|
-
* get hexadecimal string of ASN.1 TLV bytes
|
|
440
|
-
* @name getEncodedHex
|
|
441
|
-
* @memberOf KJUR.asn1.ASN1Object#
|
|
442
|
-
* @function
|
|
443
|
-
* @return {String} hexadecimal string of ASN.1 TLV
|
|
438
|
+
/**
|
|
439
|
+
* get hexadecimal string of ASN.1 TLV bytes
|
|
440
|
+
* @name getEncodedHex
|
|
441
|
+
* @memberOf KJUR.asn1.ASN1Object#
|
|
442
|
+
* @function
|
|
443
|
+
* @return {String} hexadecimal string of ASN.1 TLV
|
|
444
444
|
*/
|
|
445
445
|
this.getEncodedHex = function () {
|
|
446
446
|
if (this.hTLV == null || this.isModified) {
|
|
@@ -452,12 +452,12 @@ KJUR.asn1.ASN1Object = function () {
|
|
|
452
452
|
}
|
|
453
453
|
return this.hTLV;
|
|
454
454
|
};
|
|
455
|
-
/**
|
|
456
|
-
* get hexadecimal string of ASN.1 TLV value(V) bytes
|
|
457
|
-
* @name getValueHex
|
|
458
|
-
* @memberOf KJUR.asn1.ASN1Object#
|
|
459
|
-
* @function
|
|
460
|
-
* @return {String} hexadecimal string of ASN.1 TLV value(V) bytes
|
|
455
|
+
/**
|
|
456
|
+
* get hexadecimal string of ASN.1 TLV value(V) bytes
|
|
457
|
+
* @name getValueHex
|
|
458
|
+
* @memberOf KJUR.asn1.ASN1Object#
|
|
459
|
+
* @function
|
|
460
|
+
* @return {String} hexadecimal string of ASN.1 TLV value(V) bytes
|
|
461
461
|
*/
|
|
462
462
|
this.getValueHex = function () {
|
|
463
463
|
this.getEncodedHex();
|
|
@@ -468,43 +468,43 @@ KJUR.asn1.ASN1Object = function () {
|
|
|
468
468
|
};
|
|
469
469
|
};
|
|
470
470
|
// == BEGIN DERAbstractString ================================================
|
|
471
|
-
/**
|
|
472
|
-
* base class for ASN.1 DER string classes
|
|
473
|
-
* @name KJUR.asn1.DERAbstractString
|
|
474
|
-
* @class base class for ASN.1 DER string classes
|
|
475
|
-
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
476
|
-
* @property {String} s internal string of value
|
|
477
|
-
* @extends KJUR.asn1.ASN1Object
|
|
478
|
-
* @description
|
|
479
|
-
* <br/>
|
|
480
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
481
|
-
* following properties:
|
|
482
|
-
* <ul>
|
|
483
|
-
* <li>str - specify initial ASN.1 value(V) by a string</li>
|
|
484
|
-
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
485
|
-
* </ul>
|
|
486
|
-
* NOTE: 'params' can be omitted.
|
|
471
|
+
/**
|
|
472
|
+
* base class for ASN.1 DER string classes
|
|
473
|
+
* @name KJUR.asn1.DERAbstractString
|
|
474
|
+
* @class base class for ASN.1 DER string classes
|
|
475
|
+
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
476
|
+
* @property {String} s internal string of value
|
|
477
|
+
* @extends KJUR.asn1.ASN1Object
|
|
478
|
+
* @description
|
|
479
|
+
* <br/>
|
|
480
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
481
|
+
* following properties:
|
|
482
|
+
* <ul>
|
|
483
|
+
* <li>str - specify initial ASN.1 value(V) by a string</li>
|
|
484
|
+
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
485
|
+
* </ul>
|
|
486
|
+
* NOTE: 'params' can be omitted.
|
|
487
487
|
*/
|
|
488
488
|
KJUR.asn1.DERAbstractString = function (params) {
|
|
489
489
|
KJUR.asn1.DERAbstractString.superclass.constructor.call(this);
|
|
490
490
|
var s = null;
|
|
491
491
|
var hV = null;
|
|
492
|
-
/**
|
|
493
|
-
* get string value of this string object
|
|
494
|
-
* @name getString
|
|
495
|
-
* @memberOf KJUR.asn1.DERAbstractString#
|
|
496
|
-
* @function
|
|
497
|
-
* @return {String} string value of this string object
|
|
492
|
+
/**
|
|
493
|
+
* get string value of this string object
|
|
494
|
+
* @name getString
|
|
495
|
+
* @memberOf KJUR.asn1.DERAbstractString#
|
|
496
|
+
* @function
|
|
497
|
+
* @return {String} string value of this string object
|
|
498
498
|
*/
|
|
499
499
|
this.getString = function () {
|
|
500
500
|
return this.s;
|
|
501
501
|
};
|
|
502
|
-
/**
|
|
503
|
-
* set value by a string
|
|
504
|
-
* @name setString
|
|
505
|
-
* @memberOf KJUR.asn1.DERAbstractString#
|
|
506
|
-
* @function
|
|
507
|
-
* @param {String} newS value by a string to set
|
|
502
|
+
/**
|
|
503
|
+
* set value by a string
|
|
504
|
+
* @name setString
|
|
505
|
+
* @memberOf KJUR.asn1.DERAbstractString#
|
|
506
|
+
* @function
|
|
507
|
+
* @param {String} newS value by a string to set
|
|
508
508
|
*/
|
|
509
509
|
this.setString = function (newS) {
|
|
510
510
|
this.hTLV = null;
|
|
@@ -512,12 +512,12 @@ KJUR.asn1.DERAbstractString = function (params) {
|
|
|
512
512
|
this.s = newS;
|
|
513
513
|
this.hV = stohex(this.s);
|
|
514
514
|
};
|
|
515
|
-
/**
|
|
516
|
-
* set value by a hexadecimal string
|
|
517
|
-
* @name setStringHex
|
|
518
|
-
* @memberOf KJUR.asn1.DERAbstractString#
|
|
519
|
-
* @function
|
|
520
|
-
* @param {String} newHexString value by a hexadecimal string to set
|
|
515
|
+
/**
|
|
516
|
+
* set value by a hexadecimal string
|
|
517
|
+
* @name setStringHex
|
|
518
|
+
* @memberOf KJUR.asn1.DERAbstractString#
|
|
519
|
+
* @function
|
|
520
|
+
* @param {String} newHexString value by a hexadecimal string to set
|
|
521
521
|
*/
|
|
522
522
|
this.setStringHex = function (newHexString) {
|
|
523
523
|
this.hTLV = null;
|
|
@@ -541,14 +541,14 @@ KJUR.asn1.DERAbstractString = function (params) {
|
|
|
541
541
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);
|
|
542
542
|
// == END DERAbstractString ================================================
|
|
543
543
|
// == BEGIN DERAbstractTime ==================================================
|
|
544
|
-
/**
|
|
545
|
-
* base class for ASN.1 DER Generalized/UTCTime class
|
|
546
|
-
* @name KJUR.asn1.DERAbstractTime
|
|
547
|
-
* @class base class for ASN.1 DER Generalized/UTCTime class
|
|
548
|
-
* @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})
|
|
549
|
-
* @extends KJUR.asn1.ASN1Object
|
|
550
|
-
* @description
|
|
551
|
-
* @see KJUR.asn1.ASN1Object - superclass
|
|
544
|
+
/**
|
|
545
|
+
* base class for ASN.1 DER Generalized/UTCTime class
|
|
546
|
+
* @name KJUR.asn1.DERAbstractTime
|
|
547
|
+
* @class base class for ASN.1 DER Generalized/UTCTime class
|
|
548
|
+
* @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})
|
|
549
|
+
* @extends KJUR.asn1.ASN1Object
|
|
550
|
+
* @description
|
|
551
|
+
* @see KJUR.asn1.ASN1Object - superclass
|
|
552
552
|
*/
|
|
553
553
|
KJUR.asn1.DERAbstractTime = function (params) {
|
|
554
554
|
KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);
|
|
@@ -560,15 +560,15 @@ KJUR.asn1.DERAbstractTime = function (params) {
|
|
|
560
560
|
var utcDate = new Date(utc);
|
|
561
561
|
return utcDate;
|
|
562
562
|
};
|
|
563
|
-
/*
|
|
564
|
-
* format date string by Data object
|
|
565
|
-
* @name formatDate
|
|
566
|
-
* @memberOf KJUR.asn1.AbstractTime;
|
|
567
|
-
* @param {Date} dateObject
|
|
568
|
-
* @param {string} type 'utc' or 'gen'
|
|
569
|
-
* @param {boolean} withMillis flag for with millisections or not
|
|
570
|
-
* @description
|
|
571
|
-
* 'withMillis' flag is supported from asn1 1.0.6.
|
|
563
|
+
/*
|
|
564
|
+
* format date string by Data object
|
|
565
|
+
* @name formatDate
|
|
566
|
+
* @memberOf KJUR.asn1.AbstractTime;
|
|
567
|
+
* @param {Date} dateObject
|
|
568
|
+
* @param {string} type 'utc' or 'gen'
|
|
569
|
+
* @param {boolean} withMillis flag for with millisections or not
|
|
570
|
+
* @description
|
|
571
|
+
* 'withMillis' flag is supported from asn1 1.0.6.
|
|
572
572
|
*/
|
|
573
573
|
this.formatDate = function (dateObject, type, withMillis) {
|
|
574
574
|
var pad = this.zeroPadding;
|
|
@@ -596,22 +596,22 @@ KJUR.asn1.DERAbstractTime = function (params) {
|
|
|
596
596
|
return new Array(len - s.length + 1).join('0') + s;
|
|
597
597
|
};
|
|
598
598
|
// --- PUBLIC METHODS --------------------
|
|
599
|
-
/**
|
|
600
|
-
* get string value of this string object
|
|
601
|
-
* @name getString
|
|
602
|
-
* @memberOf KJUR.asn1.DERAbstractTime#
|
|
603
|
-
* @function
|
|
604
|
-
* @return {String} string value of this time object
|
|
599
|
+
/**
|
|
600
|
+
* get string value of this string object
|
|
601
|
+
* @name getString
|
|
602
|
+
* @memberOf KJUR.asn1.DERAbstractTime#
|
|
603
|
+
* @function
|
|
604
|
+
* @return {String} string value of this time object
|
|
605
605
|
*/
|
|
606
606
|
this.getString = function () {
|
|
607
607
|
return this.s;
|
|
608
608
|
};
|
|
609
|
-
/**
|
|
610
|
-
* set value by a string
|
|
611
|
-
* @name setString
|
|
612
|
-
* @memberOf KJUR.asn1.DERAbstractTime#
|
|
613
|
-
* @function
|
|
614
|
-
* @param {String} newS value by a string to set such like "130430235959Z"
|
|
609
|
+
/**
|
|
610
|
+
* set value by a string
|
|
611
|
+
* @name setString
|
|
612
|
+
* @memberOf KJUR.asn1.DERAbstractTime#
|
|
613
|
+
* @function
|
|
614
|
+
* @param {String} newS value by a string to set such like "130430235959Z"
|
|
615
615
|
*/
|
|
616
616
|
this.setString = function (newS) {
|
|
617
617
|
this.hTLV = null;
|
|
@@ -619,17 +619,17 @@ KJUR.asn1.DERAbstractTime = function (params) {
|
|
|
619
619
|
this.s = newS;
|
|
620
620
|
this.hV = stohex(newS);
|
|
621
621
|
};
|
|
622
|
-
/**
|
|
623
|
-
* set value by a Date object
|
|
624
|
-
* @name setByDateValue
|
|
625
|
-
* @memberOf KJUR.asn1.DERAbstractTime#
|
|
626
|
-
* @function
|
|
627
|
-
* @param {Integer} year year of date (ex. 2013)
|
|
628
|
-
* @param {Integer} month month of date between 1 and 12 (ex. 12)
|
|
629
|
-
* @param {Integer} day day of month
|
|
630
|
-
* @param {Integer} hour hours of date
|
|
631
|
-
* @param {Integer} min minutes of date
|
|
632
|
-
* @param {Integer} sec seconds of date
|
|
622
|
+
/**
|
|
623
|
+
* set value by a Date object
|
|
624
|
+
* @name setByDateValue
|
|
625
|
+
* @memberOf KJUR.asn1.DERAbstractTime#
|
|
626
|
+
* @function
|
|
627
|
+
* @param {Integer} year year of date (ex. 2013)
|
|
628
|
+
* @param {Integer} month month of date between 1 and 12 (ex. 12)
|
|
629
|
+
* @param {Integer} day day of month
|
|
630
|
+
* @param {Integer} hour hours of date
|
|
631
|
+
* @param {Integer} min minutes of date
|
|
632
|
+
* @param {Integer} sec seconds of date
|
|
633
633
|
*/
|
|
634
634
|
this.setByDateValue = function (year, month, day, hour, min, sec) {
|
|
635
635
|
var dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));
|
|
@@ -642,36 +642,36 @@ KJUR.asn1.DERAbstractTime = function (params) {
|
|
|
642
642
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);
|
|
643
643
|
// == END DERAbstractTime ==================================================
|
|
644
644
|
// == BEGIN DERAbstractStructured ============================================
|
|
645
|
-
/**
|
|
646
|
-
* base class for ASN.1 DER structured class
|
|
647
|
-
* @name KJUR.asn1.DERAbstractStructured
|
|
648
|
-
* @class base class for ASN.1 DER structured class
|
|
649
|
-
* @property {Array} asn1Array internal array of ASN1Object
|
|
650
|
-
* @extends KJUR.asn1.ASN1Object
|
|
651
|
-
* @description
|
|
652
|
-
* @see KJUR.asn1.ASN1Object - superclass
|
|
645
|
+
/**
|
|
646
|
+
* base class for ASN.1 DER structured class
|
|
647
|
+
* @name KJUR.asn1.DERAbstractStructured
|
|
648
|
+
* @class base class for ASN.1 DER structured class
|
|
649
|
+
* @property {Array} asn1Array internal array of ASN1Object
|
|
650
|
+
* @extends KJUR.asn1.ASN1Object
|
|
651
|
+
* @description
|
|
652
|
+
* @see KJUR.asn1.ASN1Object - superclass
|
|
653
653
|
*/
|
|
654
654
|
KJUR.asn1.DERAbstractStructured = function (params) {
|
|
655
655
|
KJUR.asn1.DERAbstractString.superclass.constructor.call(this);
|
|
656
656
|
var asn1Array = null;
|
|
657
|
-
/**
|
|
658
|
-
* set value by array of ASN1Object
|
|
659
|
-
* @name setByASN1ObjectArray
|
|
660
|
-
* @memberOf KJUR.asn1.DERAbstractStructured#
|
|
661
|
-
* @function
|
|
662
|
-
* @param {array} asn1ObjectArray array of ASN1Object to set
|
|
657
|
+
/**
|
|
658
|
+
* set value by array of ASN1Object
|
|
659
|
+
* @name setByASN1ObjectArray
|
|
660
|
+
* @memberOf KJUR.asn1.DERAbstractStructured#
|
|
661
|
+
* @function
|
|
662
|
+
* @param {array} asn1ObjectArray array of ASN1Object to set
|
|
663
663
|
*/
|
|
664
664
|
this.setByASN1ObjectArray = function (asn1ObjectArray) {
|
|
665
665
|
this.hTLV = null;
|
|
666
666
|
this.isModified = true;
|
|
667
667
|
this.asn1Array = asn1ObjectArray;
|
|
668
668
|
};
|
|
669
|
-
/**
|
|
670
|
-
* append an ASN1Object to internal array
|
|
671
|
-
* @name appendASN1Object
|
|
672
|
-
* @memberOf KJUR.asn1.DERAbstractStructured#
|
|
673
|
-
* @function
|
|
674
|
-
* @param {ASN1Object} asn1Object to add
|
|
669
|
+
/**
|
|
670
|
+
* append an ASN1Object to internal array
|
|
671
|
+
* @name appendASN1Object
|
|
672
|
+
* @memberOf KJUR.asn1.DERAbstractStructured#
|
|
673
|
+
* @function
|
|
674
|
+
* @param {ASN1Object} asn1Object to add
|
|
675
675
|
*/
|
|
676
676
|
this.appendASN1Object = function (asn1Object) {
|
|
677
677
|
this.hTLV = null;
|
|
@@ -690,13 +690,13 @@ _yahoo.YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);
|
|
|
690
690
|
// ASN.1 Object Classes
|
|
691
691
|
// ********************************************************************
|
|
692
692
|
// ********************************************************************
|
|
693
|
-
/**
|
|
694
|
-
* class for ASN.1 DER Boolean
|
|
695
|
-
* @name KJUR.asn1.DERBoolean
|
|
696
|
-
* @class class for ASN.1 DER Boolean
|
|
697
|
-
* @extends KJUR.asn1.ASN1Object
|
|
698
|
-
* @description
|
|
699
|
-
* @see KJUR.asn1.ASN1Object - superclass
|
|
693
|
+
/**
|
|
694
|
+
* class for ASN.1 DER Boolean
|
|
695
|
+
* @name KJUR.asn1.DERBoolean
|
|
696
|
+
* @class class for ASN.1 DER Boolean
|
|
697
|
+
* @extends KJUR.asn1.ASN1Object
|
|
698
|
+
* @description
|
|
699
|
+
* @see KJUR.asn1.ASN1Object - superclass
|
|
700
700
|
*/
|
|
701
701
|
KJUR.asn1.DERBoolean = function () {
|
|
702
702
|
KJUR.asn1.DERBoolean.superclass.constructor.call(this);
|
|
@@ -705,62 +705,62 @@ KJUR.asn1.DERBoolean = function () {
|
|
|
705
705
|
};
|
|
706
706
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);
|
|
707
707
|
// ********************************************************************
|
|
708
|
-
/**
|
|
709
|
-
* class for ASN.1 DER Integer
|
|
710
|
-
* @name KJUR.asn1.DERInteger
|
|
711
|
-
* @class class for ASN.1 DER Integer
|
|
712
|
-
* @extends KJUR.asn1.ASN1Object
|
|
713
|
-
* @description
|
|
714
|
-
* <br/>
|
|
715
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
716
|
-
* following properties:
|
|
717
|
-
* <ul>
|
|
718
|
-
* <li>int - specify initial ASN.1 value(V) by integer value</li>
|
|
719
|
-
* <li>bigint - specify initial ASN.1 value(V) by BigInteger object</li>
|
|
720
|
-
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
721
|
-
* </ul>
|
|
722
|
-
* NOTE: 'params' can be omitted.
|
|
708
|
+
/**
|
|
709
|
+
* class for ASN.1 DER Integer
|
|
710
|
+
* @name KJUR.asn1.DERInteger
|
|
711
|
+
* @class class for ASN.1 DER Integer
|
|
712
|
+
* @extends KJUR.asn1.ASN1Object
|
|
713
|
+
* @description
|
|
714
|
+
* <br/>
|
|
715
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
716
|
+
* following properties:
|
|
717
|
+
* <ul>
|
|
718
|
+
* <li>int - specify initial ASN.1 value(V) by integer value</li>
|
|
719
|
+
* <li>bigint - specify initial ASN.1 value(V) by BigInteger object</li>
|
|
720
|
+
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
721
|
+
* </ul>
|
|
722
|
+
* NOTE: 'params' can be omitted.
|
|
723
723
|
*/
|
|
724
724
|
KJUR.asn1.DERInteger = function (params) {
|
|
725
725
|
KJUR.asn1.DERInteger.superclass.constructor.call(this);
|
|
726
726
|
this.hT = "02";
|
|
727
|
-
/**
|
|
728
|
-
* set value by Tom Wu's BigInteger object
|
|
729
|
-
* @name setByBigInteger
|
|
730
|
-
* @memberOf KJUR.asn1.DERInteger#
|
|
731
|
-
* @function
|
|
732
|
-
* @param {BigInteger} bigIntegerValue to set
|
|
727
|
+
/**
|
|
728
|
+
* set value by Tom Wu's BigInteger object
|
|
729
|
+
* @name setByBigInteger
|
|
730
|
+
* @memberOf KJUR.asn1.DERInteger#
|
|
731
|
+
* @function
|
|
732
|
+
* @param {BigInteger} bigIntegerValue to set
|
|
733
733
|
*/
|
|
734
734
|
this.setByBigInteger = function (bigIntegerValue) {
|
|
735
735
|
this.hTLV = null;
|
|
736
736
|
this.isModified = true;
|
|
737
737
|
this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);
|
|
738
738
|
};
|
|
739
|
-
/**
|
|
740
|
-
* set value by integer value
|
|
741
|
-
* @name setByInteger
|
|
742
|
-
* @memberOf KJUR.asn1.DERInteger
|
|
743
|
-
* @function
|
|
744
|
-
* @param {Integer} integer value to set
|
|
739
|
+
/**
|
|
740
|
+
* set value by integer value
|
|
741
|
+
* @name setByInteger
|
|
742
|
+
* @memberOf KJUR.asn1.DERInteger
|
|
743
|
+
* @function
|
|
744
|
+
* @param {Integer} integer value to set
|
|
745
745
|
*/
|
|
746
746
|
this.setByInteger = function (intValue) {
|
|
747
747
|
var bi = new _jsbn.BigInteger(String(intValue), 10);
|
|
748
748
|
this.setByBigInteger(bi);
|
|
749
749
|
};
|
|
750
|
-
/**
|
|
751
|
-
* set value by integer value
|
|
752
|
-
* @name setValueHex
|
|
753
|
-
* @memberOf KJUR.asn1.DERInteger#
|
|
754
|
-
* @function
|
|
755
|
-
* @param {String} hexadecimal string of integer value
|
|
756
|
-
* @description
|
|
757
|
-
* <br/>
|
|
758
|
-
* NOTE: Value shall be represented by minimum octet length of
|
|
759
|
-
* two's complement representation.
|
|
760
|
-
* @example
|
|
761
|
-
* new KJUR.asn1.DERInteger(123);
|
|
762
|
-
* new KJUR.asn1.DERInteger({'int': 123});
|
|
763
|
-
* new KJUR.asn1.DERInteger({'hex': '1fad'});
|
|
750
|
+
/**
|
|
751
|
+
* set value by integer value
|
|
752
|
+
* @name setValueHex
|
|
753
|
+
* @memberOf KJUR.asn1.DERInteger#
|
|
754
|
+
* @function
|
|
755
|
+
* @param {String} hexadecimal string of integer value
|
|
756
|
+
* @description
|
|
757
|
+
* <br/>
|
|
758
|
+
* NOTE: Value shall be represented by minimum octet length of
|
|
759
|
+
* two's complement representation.
|
|
760
|
+
* @example
|
|
761
|
+
* new KJUR.asn1.DERInteger(123);
|
|
762
|
+
* new KJUR.asn1.DERInteger({'int': 123});
|
|
763
|
+
* new KJUR.asn1.DERInteger({'hex': '1fad'});
|
|
764
764
|
*/
|
|
765
765
|
this.setValueHex = function (newHexString) {
|
|
766
766
|
this.hV = newHexString;
|
|
@@ -782,43 +782,43 @@ KJUR.asn1.DERInteger = function (params) {
|
|
|
782
782
|
};
|
|
783
783
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);
|
|
784
784
|
// ********************************************************************
|
|
785
|
-
/**
|
|
786
|
-
* class for ASN.1 DER encoded BitString primitive
|
|
787
|
-
* @name KJUR.asn1.DERBitString
|
|
788
|
-
* @class class for ASN.1 DER encoded BitString primitive
|
|
789
|
-
* @extends KJUR.asn1.ASN1Object
|
|
790
|
-
* @description
|
|
791
|
-
* <br/>
|
|
792
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
793
|
-
* following properties:
|
|
794
|
-
* <ul>
|
|
795
|
-
* <li>bin - specify binary string (ex. '10111')</li>
|
|
796
|
-
* <li>array - specify array of boolean (ex. [true,false,true,true])</li>
|
|
797
|
-
* <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>
|
|
798
|
-
* <li>obj - specify {@link KJUR.asn1.ASN1Util.newObject}
|
|
799
|
-
* argument for "BitString encapsulates" structure.</li>
|
|
800
|
-
* </ul>
|
|
801
|
-
* NOTE1: 'params' can be omitted.<br/>
|
|
802
|
-
* NOTE2: 'obj' parameter have been supported since
|
|
803
|
-
* asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).<br/>
|
|
804
|
-
* @example
|
|
805
|
-
* // default constructor
|
|
806
|
-
* o = new KJUR.asn1.DERBitString();
|
|
807
|
-
* // initialize with binary string
|
|
808
|
-
* o = new KJUR.asn1.DERBitString({bin: "1011"});
|
|
809
|
-
* // initialize with boolean array
|
|
810
|
-
* o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});
|
|
811
|
-
* // initialize with hexadecimal string (04 is unused bits)
|
|
812
|
-
* o = new KJUR.asn1.DEROctetString({hex: "04bac0"});
|
|
813
|
-
* // initialize with ASN1Util.newObject argument for encapsulated
|
|
814
|
-
* o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
|
|
815
|
-
* // above generates a ASN.1 data like this:
|
|
816
|
-
* // BIT STRING, encapsulates {
|
|
817
|
-
* // SEQUENCE {
|
|
818
|
-
* // INTEGER 3
|
|
819
|
-
* // PrintableString 'aaa'
|
|
820
|
-
* // }
|
|
821
|
-
* // }
|
|
785
|
+
/**
|
|
786
|
+
* class for ASN.1 DER encoded BitString primitive
|
|
787
|
+
* @name KJUR.asn1.DERBitString
|
|
788
|
+
* @class class for ASN.1 DER encoded BitString primitive
|
|
789
|
+
* @extends KJUR.asn1.ASN1Object
|
|
790
|
+
* @description
|
|
791
|
+
* <br/>
|
|
792
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
793
|
+
* following properties:
|
|
794
|
+
* <ul>
|
|
795
|
+
* <li>bin - specify binary string (ex. '10111')</li>
|
|
796
|
+
* <li>array - specify array of boolean (ex. [true,false,true,true])</li>
|
|
797
|
+
* <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>
|
|
798
|
+
* <li>obj - specify {@link KJUR.asn1.ASN1Util.newObject}
|
|
799
|
+
* argument for "BitString encapsulates" structure.</li>
|
|
800
|
+
* </ul>
|
|
801
|
+
* NOTE1: 'params' can be omitted.<br/>
|
|
802
|
+
* NOTE2: 'obj' parameter have been supported since
|
|
803
|
+
* asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).<br/>
|
|
804
|
+
* @example
|
|
805
|
+
* // default constructor
|
|
806
|
+
* o = new KJUR.asn1.DERBitString();
|
|
807
|
+
* // initialize with binary string
|
|
808
|
+
* o = new KJUR.asn1.DERBitString({bin: "1011"});
|
|
809
|
+
* // initialize with boolean array
|
|
810
|
+
* o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});
|
|
811
|
+
* // initialize with hexadecimal string (04 is unused bits)
|
|
812
|
+
* o = new KJUR.asn1.DEROctetString({hex: "04bac0"});
|
|
813
|
+
* // initialize with ASN1Util.newObject argument for encapsulated
|
|
814
|
+
* o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
|
|
815
|
+
* // above generates a ASN.1 data like this:
|
|
816
|
+
* // BIT STRING, encapsulates {
|
|
817
|
+
* // SEQUENCE {
|
|
818
|
+
* // INTEGER 3
|
|
819
|
+
* // PrintableString 'aaa'
|
|
820
|
+
* // }
|
|
821
|
+
* // }
|
|
822
822
|
*/
|
|
823
823
|
KJUR.asn1.DERBitString = function (params) {
|
|
824
824
|
if (params !== undefined && typeof params.obj !== "undefined") {
|
|
@@ -827,25 +827,25 @@ KJUR.asn1.DERBitString = function (params) {
|
|
|
827
827
|
}
|
|
828
828
|
KJUR.asn1.DERBitString.superclass.constructor.call(this);
|
|
829
829
|
this.hT = "03";
|
|
830
|
-
/**
|
|
831
|
-
* set ASN.1 value(V) by a hexadecimal string including unused bits
|
|
832
|
-
* @name setHexValueIncludingUnusedBits
|
|
833
|
-
* @memberOf KJUR.asn1.DERBitString#
|
|
834
|
-
* @function
|
|
835
|
-
* @param {String} newHexStringIncludingUnusedBits
|
|
830
|
+
/**
|
|
831
|
+
* set ASN.1 value(V) by a hexadecimal string including unused bits
|
|
832
|
+
* @name setHexValueIncludingUnusedBits
|
|
833
|
+
* @memberOf KJUR.asn1.DERBitString#
|
|
834
|
+
* @function
|
|
835
|
+
* @param {String} newHexStringIncludingUnusedBits
|
|
836
836
|
*/
|
|
837
837
|
this.setHexValueIncludingUnusedBits = function (newHexStringIncludingUnusedBits) {
|
|
838
838
|
this.hTLV = null;
|
|
839
839
|
this.isModified = true;
|
|
840
840
|
this.hV = newHexStringIncludingUnusedBits;
|
|
841
841
|
};
|
|
842
|
-
/**
|
|
843
|
-
* set ASN.1 value(V) by unused bit and hexadecimal string of value
|
|
844
|
-
* @name setUnusedBitsAndHexValue
|
|
845
|
-
* @memberOf KJUR.asn1.DERBitString#
|
|
846
|
-
* @function
|
|
847
|
-
* @param {Integer} unusedBits
|
|
848
|
-
* @param {String} hValue
|
|
842
|
+
/**
|
|
843
|
+
* set ASN.1 value(V) by unused bit and hexadecimal string of value
|
|
844
|
+
* @name setUnusedBitsAndHexValue
|
|
845
|
+
* @memberOf KJUR.asn1.DERBitString#
|
|
846
|
+
* @function
|
|
847
|
+
* @param {Integer} unusedBits
|
|
848
|
+
* @param {String} hValue
|
|
849
849
|
*/
|
|
850
850
|
this.setUnusedBitsAndHexValue = function (unusedBits, hValue) {
|
|
851
851
|
if (unusedBits < 0 || 7 < unusedBits) {
|
|
@@ -856,19 +856,19 @@ KJUR.asn1.DERBitString = function (params) {
|
|
|
856
856
|
this.isModified = true;
|
|
857
857
|
this.hV = hUnusedBits + hValue;
|
|
858
858
|
};
|
|
859
|
-
/**
|
|
860
|
-
* set ASN.1 DER BitString by binary string<br/>
|
|
861
|
-
* @name setByBinaryString
|
|
862
|
-
* @memberOf KJUR.asn1.DERBitString#
|
|
863
|
-
* @function
|
|
864
|
-
* @param {String} binaryString binary value string (i.e. '10111')
|
|
865
|
-
* @description
|
|
866
|
-
* Its unused bits will be calculated automatically by length of
|
|
867
|
-
* 'binaryValue'. <br/>
|
|
868
|
-
* NOTE: Trailing zeros '0' will be ignored.
|
|
869
|
-
* @example
|
|
870
|
-
* o = new KJUR.asn1.DERBitString();
|
|
871
|
-
* o.setByBooleanArray("01011");
|
|
859
|
+
/**
|
|
860
|
+
* set ASN.1 DER BitString by binary string<br/>
|
|
861
|
+
* @name setByBinaryString
|
|
862
|
+
* @memberOf KJUR.asn1.DERBitString#
|
|
863
|
+
* @function
|
|
864
|
+
* @param {String} binaryString binary value string (i.e. '10111')
|
|
865
|
+
* @description
|
|
866
|
+
* Its unused bits will be calculated automatically by length of
|
|
867
|
+
* 'binaryValue'. <br/>
|
|
868
|
+
* NOTE: Trailing zeros '0' will be ignored.
|
|
869
|
+
* @example
|
|
870
|
+
* o = new KJUR.asn1.DERBitString();
|
|
871
|
+
* o.setByBooleanArray("01011");
|
|
872
872
|
*/
|
|
873
873
|
this.setByBinaryString = function (binaryString) {
|
|
874
874
|
binaryString = binaryString.replace(/0+$/, '');
|
|
@@ -888,17 +888,17 @@ KJUR.asn1.DERBitString = function (params) {
|
|
|
888
888
|
this.isModified = true;
|
|
889
889
|
this.hV = '0' + unusedBits + h;
|
|
890
890
|
};
|
|
891
|
-
/**
|
|
892
|
-
* set ASN.1 TLV value(V) by an array of boolean<br/>
|
|
893
|
-
* @name setByBooleanArray
|
|
894
|
-
* @memberOf KJUR.asn1.DERBitString#
|
|
895
|
-
* @function
|
|
896
|
-
* @param {array} booleanArray array of boolean (ex. [true, false, true])
|
|
897
|
-
* @description
|
|
898
|
-
* NOTE: Trailing falses will be ignored in the ASN.1 DER Object.
|
|
899
|
-
* @example
|
|
900
|
-
* o = new KJUR.asn1.DERBitString();
|
|
901
|
-
* o.setByBooleanArray([false, true, false, true, true]);
|
|
891
|
+
/**
|
|
892
|
+
* set ASN.1 TLV value(V) by an array of boolean<br/>
|
|
893
|
+
* @name setByBooleanArray
|
|
894
|
+
* @memberOf KJUR.asn1.DERBitString#
|
|
895
|
+
* @function
|
|
896
|
+
* @param {array} booleanArray array of boolean (ex. [true, false, true])
|
|
897
|
+
* @description
|
|
898
|
+
* NOTE: Trailing falses will be ignored in the ASN.1 DER Object.
|
|
899
|
+
* @example
|
|
900
|
+
* o = new KJUR.asn1.DERBitString();
|
|
901
|
+
* o.setByBooleanArray([false, true, false, true, true]);
|
|
902
902
|
*/
|
|
903
903
|
this.setByBooleanArray = function (booleanArray) {
|
|
904
904
|
var s = '';
|
|
@@ -911,18 +911,18 @@ KJUR.asn1.DERBitString = function (params) {
|
|
|
911
911
|
}
|
|
912
912
|
this.setByBinaryString(s);
|
|
913
913
|
};
|
|
914
|
-
/**
|
|
915
|
-
* generate an array of falses with specified length<br/>
|
|
916
|
-
* @name newFalseArray
|
|
917
|
-
* @memberOf KJUR.asn1.DERBitString
|
|
918
|
-
* @function
|
|
919
|
-
* @param {Integer} nLength length of array to generate
|
|
920
|
-
* @return {array} array of boolean falses
|
|
921
|
-
* @description
|
|
922
|
-
* This static method may be useful to initialize boolean array.
|
|
923
|
-
* @example
|
|
924
|
-
* o = new KJUR.asn1.DERBitString();
|
|
925
|
-
* o.newFalseArray(3) → [false, false, false]
|
|
914
|
+
/**
|
|
915
|
+
* generate an array of falses with specified length<br/>
|
|
916
|
+
* @name newFalseArray
|
|
917
|
+
* @memberOf KJUR.asn1.DERBitString
|
|
918
|
+
* @function
|
|
919
|
+
* @param {Integer} nLength length of array to generate
|
|
920
|
+
* @return {array} array of boolean falses
|
|
921
|
+
* @description
|
|
922
|
+
* This static method may be useful to initialize boolean array.
|
|
923
|
+
* @example
|
|
924
|
+
* o = new KJUR.asn1.DERBitString();
|
|
925
|
+
* o.newFalseArray(3) → [false, false, false]
|
|
926
926
|
*/
|
|
927
927
|
this.newFalseArray = function (nLength) {
|
|
928
928
|
var a = new Array(nLength);
|
|
@@ -948,41 +948,41 @@ KJUR.asn1.DERBitString = function (params) {
|
|
|
948
948
|
};
|
|
949
949
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);
|
|
950
950
|
// ********************************************************************
|
|
951
|
-
/**
|
|
952
|
-
* class for ASN.1 DER OctetString<br/>
|
|
953
|
-
* @name KJUR.asn1.DEROctetString
|
|
954
|
-
* @class class for ASN.1 DER OctetString
|
|
955
|
-
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
956
|
-
* @extends KJUR.asn1.DERAbstractString
|
|
957
|
-
* @description
|
|
958
|
-
* This class provides ASN.1 OctetString simple type.<br/>
|
|
959
|
-
* Supported "params" attributes are:
|
|
960
|
-
* <ul>
|
|
961
|
-
* <li>str - to set a string as a value</li>
|
|
962
|
-
* <li>hex - to set a hexadecimal string as a value</li>
|
|
963
|
-
* <li>obj - to set a encapsulated ASN.1 value by JSON object
|
|
964
|
-
* which is defined in {@link KJUR.asn1.ASN1Util.newObject}</li>
|
|
965
|
-
* </ul>
|
|
966
|
-
* NOTE: A parameter 'obj' have been supported
|
|
967
|
-
* for "OCTET STRING, encapsulates" structure.
|
|
968
|
-
* since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).
|
|
969
|
-
* @see KJUR.asn1.DERAbstractString - superclass
|
|
970
|
-
* @example
|
|
971
|
-
* // default constructor
|
|
972
|
-
* o = new KJUR.asn1.DEROctetString();
|
|
973
|
-
* // initialize with string
|
|
974
|
-
* o = new KJUR.asn1.DEROctetString({str: "aaa"});
|
|
975
|
-
* // initialize with hexadecimal string
|
|
976
|
-
* o = new KJUR.asn1.DEROctetString({hex: "616161"});
|
|
977
|
-
* // initialize with ASN1Util.newObject argument
|
|
978
|
-
* o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
|
|
979
|
-
* // above generates a ASN.1 data like this:
|
|
980
|
-
* // OCTET STRING, encapsulates {
|
|
981
|
-
* // SEQUENCE {
|
|
982
|
-
* // INTEGER 3
|
|
983
|
-
* // PrintableString 'aaa'
|
|
984
|
-
* // }
|
|
985
|
-
* // }
|
|
951
|
+
/**
|
|
952
|
+
* class for ASN.1 DER OctetString<br/>
|
|
953
|
+
* @name KJUR.asn1.DEROctetString
|
|
954
|
+
* @class class for ASN.1 DER OctetString
|
|
955
|
+
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
956
|
+
* @extends KJUR.asn1.DERAbstractString
|
|
957
|
+
* @description
|
|
958
|
+
* This class provides ASN.1 OctetString simple type.<br/>
|
|
959
|
+
* Supported "params" attributes are:
|
|
960
|
+
* <ul>
|
|
961
|
+
* <li>str - to set a string as a value</li>
|
|
962
|
+
* <li>hex - to set a hexadecimal string as a value</li>
|
|
963
|
+
* <li>obj - to set a encapsulated ASN.1 value by JSON object
|
|
964
|
+
* which is defined in {@link KJUR.asn1.ASN1Util.newObject}</li>
|
|
965
|
+
* </ul>
|
|
966
|
+
* NOTE: A parameter 'obj' have been supported
|
|
967
|
+
* for "OCTET STRING, encapsulates" structure.
|
|
968
|
+
* since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).
|
|
969
|
+
* @see KJUR.asn1.DERAbstractString - superclass
|
|
970
|
+
* @example
|
|
971
|
+
* // default constructor
|
|
972
|
+
* o = new KJUR.asn1.DEROctetString();
|
|
973
|
+
* // initialize with string
|
|
974
|
+
* o = new KJUR.asn1.DEROctetString({str: "aaa"});
|
|
975
|
+
* // initialize with hexadecimal string
|
|
976
|
+
* o = new KJUR.asn1.DEROctetString({hex: "616161"});
|
|
977
|
+
* // initialize with ASN1Util.newObject argument
|
|
978
|
+
* o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
|
|
979
|
+
* // above generates a ASN.1 data like this:
|
|
980
|
+
* // OCTET STRING, encapsulates {
|
|
981
|
+
* // SEQUENCE {
|
|
982
|
+
* // INTEGER 3
|
|
983
|
+
* // PrintableString 'aaa'
|
|
984
|
+
* // }
|
|
985
|
+
* // }
|
|
986
986
|
*/
|
|
987
987
|
KJUR.asn1.DEROctetString = function (params) {
|
|
988
988
|
if (params !== undefined && typeof params.obj !== "undefined") {
|
|
@@ -994,13 +994,13 @@ KJUR.asn1.DEROctetString = function (params) {
|
|
|
994
994
|
};
|
|
995
995
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);
|
|
996
996
|
// ********************************************************************
|
|
997
|
-
/**
|
|
998
|
-
* class for ASN.1 DER Null
|
|
999
|
-
* @name KJUR.asn1.DERNull
|
|
1000
|
-
* @class class for ASN.1 DER Null
|
|
1001
|
-
* @extends KJUR.asn1.ASN1Object
|
|
1002
|
-
* @description
|
|
1003
|
-
* @see KJUR.asn1.ASN1Object - superclass
|
|
997
|
+
/**
|
|
998
|
+
* class for ASN.1 DER Null
|
|
999
|
+
* @name KJUR.asn1.DERNull
|
|
1000
|
+
* @class class for ASN.1 DER Null
|
|
1001
|
+
* @extends KJUR.asn1.ASN1Object
|
|
1002
|
+
* @description
|
|
1003
|
+
* @see KJUR.asn1.ASN1Object - superclass
|
|
1004
1004
|
*/
|
|
1005
1005
|
KJUR.asn1.DERNull = function () {
|
|
1006
1006
|
KJUR.asn1.DERNull.superclass.constructor.call(this);
|
|
@@ -1009,21 +1009,21 @@ KJUR.asn1.DERNull = function () {
|
|
|
1009
1009
|
};
|
|
1010
1010
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);
|
|
1011
1011
|
// ********************************************************************
|
|
1012
|
-
/**
|
|
1013
|
-
* class for ASN.1 DER ObjectIdentifier
|
|
1014
|
-
* @name KJUR.asn1.DERObjectIdentifier
|
|
1015
|
-
* @class class for ASN.1 DER ObjectIdentifier
|
|
1016
|
-
* @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})
|
|
1017
|
-
* @extends KJUR.asn1.ASN1Object
|
|
1018
|
-
* @description
|
|
1019
|
-
* <br/>
|
|
1020
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
1021
|
-
* following properties:
|
|
1022
|
-
* <ul>
|
|
1023
|
-
* <li>oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)</li>
|
|
1024
|
-
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
1025
|
-
* </ul>
|
|
1026
|
-
* NOTE: 'params' can be omitted.
|
|
1012
|
+
/**
|
|
1013
|
+
* class for ASN.1 DER ObjectIdentifier
|
|
1014
|
+
* @name KJUR.asn1.DERObjectIdentifier
|
|
1015
|
+
* @class class for ASN.1 DER ObjectIdentifier
|
|
1016
|
+
* @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})
|
|
1017
|
+
* @extends KJUR.asn1.ASN1Object
|
|
1018
|
+
* @description
|
|
1019
|
+
* <br/>
|
|
1020
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
1021
|
+
* following properties:
|
|
1022
|
+
* <ul>
|
|
1023
|
+
* <li>oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)</li>
|
|
1024
|
+
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
1025
|
+
* </ul>
|
|
1026
|
+
* NOTE: 'params' can be omitted.
|
|
1027
1027
|
*/
|
|
1028
1028
|
KJUR.asn1.DERObjectIdentifier = function (params) {
|
|
1029
1029
|
var itox = function itox(i) {
|
|
@@ -1050,12 +1050,12 @@ KJUR.asn1.DERObjectIdentifier = function (params) {
|
|
|
1050
1050
|
};
|
|
1051
1051
|
KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);
|
|
1052
1052
|
this.hT = "06";
|
|
1053
|
-
/**
|
|
1054
|
-
* set value by a hexadecimal string
|
|
1055
|
-
* @name setValueHex
|
|
1056
|
-
* @memberOf KJUR.asn1.DERObjectIdentifier#
|
|
1057
|
-
* @function
|
|
1058
|
-
* @param {String} newHexString hexadecimal value of OID bytes
|
|
1053
|
+
/**
|
|
1054
|
+
* set value by a hexadecimal string
|
|
1055
|
+
* @name setValueHex
|
|
1056
|
+
* @memberOf KJUR.asn1.DERObjectIdentifier#
|
|
1057
|
+
* @function
|
|
1058
|
+
* @param {String} newHexString hexadecimal value of OID bytes
|
|
1059
1059
|
*/
|
|
1060
1060
|
this.setValueHex = function (newHexString) {
|
|
1061
1061
|
this.hTLV = null;
|
|
@@ -1063,15 +1063,15 @@ KJUR.asn1.DERObjectIdentifier = function (params) {
|
|
|
1063
1063
|
this.s = null;
|
|
1064
1064
|
this.hV = newHexString;
|
|
1065
1065
|
};
|
|
1066
|
-
/**
|
|
1067
|
-
* set value by a OID string<br/>
|
|
1068
|
-
* @name setValueOidString
|
|
1069
|
-
* @memberOf KJUR.asn1.DERObjectIdentifier#
|
|
1070
|
-
* @function
|
|
1071
|
-
* @param {String} oidString OID string (ex. 2.5.4.13)
|
|
1072
|
-
* @example
|
|
1073
|
-
* o = new KJUR.asn1.DERObjectIdentifier();
|
|
1074
|
-
* o.setValueOidString("2.5.4.13");
|
|
1066
|
+
/**
|
|
1067
|
+
* set value by a OID string<br/>
|
|
1068
|
+
* @name setValueOidString
|
|
1069
|
+
* @memberOf KJUR.asn1.DERObjectIdentifier#
|
|
1070
|
+
* @function
|
|
1071
|
+
* @param {String} oidString OID string (ex. 2.5.4.13)
|
|
1072
|
+
* @example
|
|
1073
|
+
* o = new KJUR.asn1.DERObjectIdentifier();
|
|
1074
|
+
* o.setValueOidString("2.5.4.13");
|
|
1075
1075
|
*/
|
|
1076
1076
|
this.setValueOidString = function (oidString) {
|
|
1077
1077
|
if (!oidString.match(/^[0-9.]+$/)) {
|
|
@@ -1090,19 +1090,19 @@ KJUR.asn1.DERObjectIdentifier = function (params) {
|
|
|
1090
1090
|
this.s = null;
|
|
1091
1091
|
this.hV = h;
|
|
1092
1092
|
};
|
|
1093
|
-
/**
|
|
1094
|
-
* set value by a OID name
|
|
1095
|
-
* @name setValueName
|
|
1096
|
-
* @memberOf KJUR.asn1.DERObjectIdentifier#
|
|
1097
|
-
* @function
|
|
1098
|
-
* @param {String} oidName OID name (ex. 'serverAuth')
|
|
1099
|
-
* @since 1.0.1
|
|
1100
|
-
* @description
|
|
1101
|
-
* OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.
|
|
1102
|
-
* Otherwise raise error.
|
|
1103
|
-
* @example
|
|
1104
|
-
* o = new KJUR.asn1.DERObjectIdentifier();
|
|
1105
|
-
* o.setValueName("serverAuth");
|
|
1093
|
+
/**
|
|
1094
|
+
* set value by a OID name
|
|
1095
|
+
* @name setValueName
|
|
1096
|
+
* @memberOf KJUR.asn1.DERObjectIdentifier#
|
|
1097
|
+
* @function
|
|
1098
|
+
* @param {String} oidName OID name (ex. 'serverAuth')
|
|
1099
|
+
* @since 1.0.1
|
|
1100
|
+
* @description
|
|
1101
|
+
* OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.
|
|
1102
|
+
* Otherwise raise error.
|
|
1103
|
+
* @example
|
|
1104
|
+
* o = new KJUR.asn1.DERObjectIdentifier();
|
|
1105
|
+
* o.setValueName("serverAuth");
|
|
1106
1106
|
*/
|
|
1107
1107
|
this.setValueName = function (oidName) {
|
|
1108
1108
|
var oid = KJUR.asn1.x509.OID.name2oid(oidName);
|
|
@@ -1133,61 +1133,61 @@ KJUR.asn1.DERObjectIdentifier = function (params) {
|
|
|
1133
1133
|
};
|
|
1134
1134
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);
|
|
1135
1135
|
// ********************************************************************
|
|
1136
|
-
/**
|
|
1137
|
-
* class for ASN.1 DER Enumerated
|
|
1138
|
-
* @name KJUR.asn1.DEREnumerated
|
|
1139
|
-
* @class class for ASN.1 DER Enumerated
|
|
1140
|
-
* @extends KJUR.asn1.ASN1Object
|
|
1141
|
-
* @description
|
|
1142
|
-
* <br/>
|
|
1143
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
1144
|
-
* following properties:
|
|
1145
|
-
* <ul>
|
|
1146
|
-
* <li>int - specify initial ASN.1 value(V) by integer value</li>
|
|
1147
|
-
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
1148
|
-
* </ul>
|
|
1149
|
-
* NOTE: 'params' can be omitted.
|
|
1150
|
-
* @example
|
|
1151
|
-
* new KJUR.asn1.DEREnumerated(123);
|
|
1152
|
-
* new KJUR.asn1.DEREnumerated({int: 123});
|
|
1153
|
-
* new KJUR.asn1.DEREnumerated({hex: '1fad'});
|
|
1136
|
+
/**
|
|
1137
|
+
* class for ASN.1 DER Enumerated
|
|
1138
|
+
* @name KJUR.asn1.DEREnumerated
|
|
1139
|
+
* @class class for ASN.1 DER Enumerated
|
|
1140
|
+
* @extends KJUR.asn1.ASN1Object
|
|
1141
|
+
* @description
|
|
1142
|
+
* <br/>
|
|
1143
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
1144
|
+
* following properties:
|
|
1145
|
+
* <ul>
|
|
1146
|
+
* <li>int - specify initial ASN.1 value(V) by integer value</li>
|
|
1147
|
+
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
1148
|
+
* </ul>
|
|
1149
|
+
* NOTE: 'params' can be omitted.
|
|
1150
|
+
* @example
|
|
1151
|
+
* new KJUR.asn1.DEREnumerated(123);
|
|
1152
|
+
* new KJUR.asn1.DEREnumerated({int: 123});
|
|
1153
|
+
* new KJUR.asn1.DEREnumerated({hex: '1fad'});
|
|
1154
1154
|
*/
|
|
1155
1155
|
KJUR.asn1.DEREnumerated = function (params) {
|
|
1156
1156
|
KJUR.asn1.DEREnumerated.superclass.constructor.call(this);
|
|
1157
1157
|
this.hT = "0a";
|
|
1158
|
-
/**
|
|
1159
|
-
* set value by Tom Wu's BigInteger object
|
|
1160
|
-
* @name setByBigInteger
|
|
1161
|
-
* @memberOf KJUR.asn1.DEREnumerated#
|
|
1162
|
-
* @function
|
|
1163
|
-
* @param {BigInteger} bigIntegerValue to set
|
|
1158
|
+
/**
|
|
1159
|
+
* set value by Tom Wu's BigInteger object
|
|
1160
|
+
* @name setByBigInteger
|
|
1161
|
+
* @memberOf KJUR.asn1.DEREnumerated#
|
|
1162
|
+
* @function
|
|
1163
|
+
* @param {BigInteger} bigIntegerValue to set
|
|
1164
1164
|
*/
|
|
1165
1165
|
this.setByBigInteger = function (bigIntegerValue) {
|
|
1166
1166
|
this.hTLV = null;
|
|
1167
1167
|
this.isModified = true;
|
|
1168
1168
|
this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);
|
|
1169
1169
|
};
|
|
1170
|
-
/**
|
|
1171
|
-
* set value by integer value
|
|
1172
|
-
* @name setByInteger
|
|
1173
|
-
* @memberOf KJUR.asn1.DEREnumerated#
|
|
1174
|
-
* @function
|
|
1175
|
-
* @param {Integer} integer value to set
|
|
1170
|
+
/**
|
|
1171
|
+
* set value by integer value
|
|
1172
|
+
* @name setByInteger
|
|
1173
|
+
* @memberOf KJUR.asn1.DEREnumerated#
|
|
1174
|
+
* @function
|
|
1175
|
+
* @param {Integer} integer value to set
|
|
1176
1176
|
*/
|
|
1177
1177
|
this.setByInteger = function (intValue) {
|
|
1178
1178
|
var bi = new _jsbn.BigInteger(String(intValue), 10);
|
|
1179
1179
|
this.setByBigInteger(bi);
|
|
1180
1180
|
};
|
|
1181
|
-
/**
|
|
1182
|
-
* set value by integer value
|
|
1183
|
-
* @name setValueHex
|
|
1184
|
-
* @memberOf KJUR.asn1.DEREnumerated#
|
|
1185
|
-
* @function
|
|
1186
|
-
* @param {String} hexadecimal string of integer value
|
|
1187
|
-
* @description
|
|
1188
|
-
* <br/>
|
|
1189
|
-
* NOTE: Value shall be represented by minimum octet length of
|
|
1190
|
-
* two's complement representation.
|
|
1181
|
+
/**
|
|
1182
|
+
* set value by integer value
|
|
1183
|
+
* @name setValueHex
|
|
1184
|
+
* @memberOf KJUR.asn1.DEREnumerated#
|
|
1185
|
+
* @function
|
|
1186
|
+
* @param {String} hexadecimal string of integer value
|
|
1187
|
+
* @description
|
|
1188
|
+
* <br/>
|
|
1189
|
+
* NOTE: Value shall be represented by minimum octet length of
|
|
1190
|
+
* two's complement representation.
|
|
1191
1191
|
*/
|
|
1192
1192
|
this.setValueHex = function (newHexString) {
|
|
1193
1193
|
this.hV = newHexString;
|
|
@@ -1207,14 +1207,14 @@ KJUR.asn1.DEREnumerated = function (params) {
|
|
|
1207
1207
|
};
|
|
1208
1208
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);
|
|
1209
1209
|
// ********************************************************************
|
|
1210
|
-
/**
|
|
1211
|
-
* class for ASN.1 DER UTF8String
|
|
1212
|
-
* @name KJUR.asn1.DERUTF8String
|
|
1213
|
-
* @class class for ASN.1 DER UTF8String
|
|
1214
|
-
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1215
|
-
* @extends KJUR.asn1.DERAbstractString
|
|
1216
|
-
* @description
|
|
1217
|
-
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1210
|
+
/**
|
|
1211
|
+
* class for ASN.1 DER UTF8String
|
|
1212
|
+
* @name KJUR.asn1.DERUTF8String
|
|
1213
|
+
* @class class for ASN.1 DER UTF8String
|
|
1214
|
+
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1215
|
+
* @extends KJUR.asn1.DERAbstractString
|
|
1216
|
+
* @description
|
|
1217
|
+
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1218
1218
|
*/
|
|
1219
1219
|
KJUR.asn1.DERUTF8String = function (params) {
|
|
1220
1220
|
KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);
|
|
@@ -1222,14 +1222,14 @@ KJUR.asn1.DERUTF8String = function (params) {
|
|
|
1222
1222
|
};
|
|
1223
1223
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);
|
|
1224
1224
|
// ********************************************************************
|
|
1225
|
-
/**
|
|
1226
|
-
* class for ASN.1 DER NumericString
|
|
1227
|
-
* @name KJUR.asn1.DERNumericString
|
|
1228
|
-
* @class class for ASN.1 DER NumericString
|
|
1229
|
-
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1230
|
-
* @extends KJUR.asn1.DERAbstractString
|
|
1231
|
-
* @description
|
|
1232
|
-
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1225
|
+
/**
|
|
1226
|
+
* class for ASN.1 DER NumericString
|
|
1227
|
+
* @name KJUR.asn1.DERNumericString
|
|
1228
|
+
* @class class for ASN.1 DER NumericString
|
|
1229
|
+
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1230
|
+
* @extends KJUR.asn1.DERAbstractString
|
|
1231
|
+
* @description
|
|
1232
|
+
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1233
1233
|
*/
|
|
1234
1234
|
KJUR.asn1.DERNumericString = function (params) {
|
|
1235
1235
|
KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);
|
|
@@ -1237,14 +1237,14 @@ KJUR.asn1.DERNumericString = function (params) {
|
|
|
1237
1237
|
};
|
|
1238
1238
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);
|
|
1239
1239
|
// ********************************************************************
|
|
1240
|
-
/**
|
|
1241
|
-
* class for ASN.1 DER PrintableString
|
|
1242
|
-
* @name KJUR.asn1.DERPrintableString
|
|
1243
|
-
* @class class for ASN.1 DER PrintableString
|
|
1244
|
-
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1245
|
-
* @extends KJUR.asn1.DERAbstractString
|
|
1246
|
-
* @description
|
|
1247
|
-
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1240
|
+
/**
|
|
1241
|
+
* class for ASN.1 DER PrintableString
|
|
1242
|
+
* @name KJUR.asn1.DERPrintableString
|
|
1243
|
+
* @class class for ASN.1 DER PrintableString
|
|
1244
|
+
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1245
|
+
* @extends KJUR.asn1.DERAbstractString
|
|
1246
|
+
* @description
|
|
1247
|
+
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1248
1248
|
*/
|
|
1249
1249
|
KJUR.asn1.DERPrintableString = function (params) {
|
|
1250
1250
|
KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);
|
|
@@ -1252,14 +1252,14 @@ KJUR.asn1.DERPrintableString = function (params) {
|
|
|
1252
1252
|
};
|
|
1253
1253
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);
|
|
1254
1254
|
// ********************************************************************
|
|
1255
|
-
/**
|
|
1256
|
-
* class for ASN.1 DER TeletexString
|
|
1257
|
-
* @name KJUR.asn1.DERTeletexString
|
|
1258
|
-
* @class class for ASN.1 DER TeletexString
|
|
1259
|
-
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1260
|
-
* @extends KJUR.asn1.DERAbstractString
|
|
1261
|
-
* @description
|
|
1262
|
-
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1255
|
+
/**
|
|
1256
|
+
* class for ASN.1 DER TeletexString
|
|
1257
|
+
* @name KJUR.asn1.DERTeletexString
|
|
1258
|
+
* @class class for ASN.1 DER TeletexString
|
|
1259
|
+
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1260
|
+
* @extends KJUR.asn1.DERAbstractString
|
|
1261
|
+
* @description
|
|
1262
|
+
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1263
1263
|
*/
|
|
1264
1264
|
KJUR.asn1.DERTeletexString = function (params) {
|
|
1265
1265
|
KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);
|
|
@@ -1267,14 +1267,14 @@ KJUR.asn1.DERTeletexString = function (params) {
|
|
|
1267
1267
|
};
|
|
1268
1268
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);
|
|
1269
1269
|
// ********************************************************************
|
|
1270
|
-
/**
|
|
1271
|
-
* class for ASN.1 DER IA5String
|
|
1272
|
-
* @name KJUR.asn1.DERIA5String
|
|
1273
|
-
* @class class for ASN.1 DER IA5String
|
|
1274
|
-
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1275
|
-
* @extends KJUR.asn1.DERAbstractString
|
|
1276
|
-
* @description
|
|
1277
|
-
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1270
|
+
/**
|
|
1271
|
+
* class for ASN.1 DER IA5String
|
|
1272
|
+
* @name KJUR.asn1.DERIA5String
|
|
1273
|
+
* @class class for ASN.1 DER IA5String
|
|
1274
|
+
* @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
|
|
1275
|
+
* @extends KJUR.asn1.DERAbstractString
|
|
1276
|
+
* @description
|
|
1277
|
+
* @see KJUR.asn1.DERAbstractString - superclass
|
|
1278
1278
|
*/
|
|
1279
1279
|
KJUR.asn1.DERIA5String = function (params) {
|
|
1280
1280
|
KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);
|
|
@@ -1282,43 +1282,43 @@ KJUR.asn1.DERIA5String = function (params) {
|
|
|
1282
1282
|
};
|
|
1283
1283
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);
|
|
1284
1284
|
// ********************************************************************
|
|
1285
|
-
/**
|
|
1286
|
-
* class for ASN.1 DER UTCTime
|
|
1287
|
-
* @name KJUR.asn1.DERUTCTime
|
|
1288
|
-
* @class class for ASN.1 DER UTCTime
|
|
1289
|
-
* @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})
|
|
1290
|
-
* @extends KJUR.asn1.DERAbstractTime
|
|
1291
|
-
* @description
|
|
1292
|
-
* <br/>
|
|
1293
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
1294
|
-
* following properties:
|
|
1295
|
-
* <ul>
|
|
1296
|
-
* <li>str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')</li>
|
|
1297
|
-
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
1298
|
-
* <li>date - specify Date object.</li>
|
|
1299
|
-
* </ul>
|
|
1300
|
-
* NOTE: 'params' can be omitted.
|
|
1301
|
-
* <h4>EXAMPLES</h4>
|
|
1302
|
-
* @example
|
|
1303
|
-
* d1 = new KJUR.asn1.DERUTCTime();
|
|
1304
|
-
* d1.setString('130430125959Z');
|
|
1305
|
-
*
|
|
1306
|
-
* d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});
|
|
1307
|
-
* d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});
|
|
1308
|
-
* d4 = new KJUR.asn1.DERUTCTime('130430125959Z');
|
|
1285
|
+
/**
|
|
1286
|
+
* class for ASN.1 DER UTCTime
|
|
1287
|
+
* @name KJUR.asn1.DERUTCTime
|
|
1288
|
+
* @class class for ASN.1 DER UTCTime
|
|
1289
|
+
* @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})
|
|
1290
|
+
* @extends KJUR.asn1.DERAbstractTime
|
|
1291
|
+
* @description
|
|
1292
|
+
* <br/>
|
|
1293
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
1294
|
+
* following properties:
|
|
1295
|
+
* <ul>
|
|
1296
|
+
* <li>str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')</li>
|
|
1297
|
+
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
1298
|
+
* <li>date - specify Date object.</li>
|
|
1299
|
+
* </ul>
|
|
1300
|
+
* NOTE: 'params' can be omitted.
|
|
1301
|
+
* <h4>EXAMPLES</h4>
|
|
1302
|
+
* @example
|
|
1303
|
+
* d1 = new KJUR.asn1.DERUTCTime();
|
|
1304
|
+
* d1.setString('130430125959Z');
|
|
1305
|
+
*
|
|
1306
|
+
* d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});
|
|
1307
|
+
* d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});
|
|
1308
|
+
* d4 = new KJUR.asn1.DERUTCTime('130430125959Z');
|
|
1309
1309
|
*/
|
|
1310
1310
|
KJUR.asn1.DERUTCTime = function (params) {
|
|
1311
1311
|
KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);
|
|
1312
1312
|
this.hT = "17";
|
|
1313
|
-
/**
|
|
1314
|
-
* set value by a Date object<br/>
|
|
1315
|
-
* @name setByDate
|
|
1316
|
-
* @memberOf KJUR.asn1.DERUTCTime#
|
|
1317
|
-
* @function
|
|
1318
|
-
* @param {Date} dateObject Date object to set ASN.1 value(V)
|
|
1319
|
-
* @example
|
|
1320
|
-
* o = new KJUR.asn1.DERUTCTime();
|
|
1321
|
-
* o.setByDate(new Date("2016/12/31"));
|
|
1313
|
+
/**
|
|
1314
|
+
* set value by a Date object<br/>
|
|
1315
|
+
* @name setByDate
|
|
1316
|
+
* @memberOf KJUR.asn1.DERUTCTime#
|
|
1317
|
+
* @function
|
|
1318
|
+
* @param {Date} dateObject Date object to set ASN.1 value(V)
|
|
1319
|
+
* @example
|
|
1320
|
+
* o = new KJUR.asn1.DERUTCTime();
|
|
1321
|
+
* o.setByDate(new Date("2016/12/31"));
|
|
1322
1322
|
*/
|
|
1323
1323
|
this.setByDate = function (dateObject) {
|
|
1324
1324
|
this.hTLV = null;
|
|
@@ -1349,42 +1349,42 @@ KJUR.asn1.DERUTCTime = function (params) {
|
|
|
1349
1349
|
};
|
|
1350
1350
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);
|
|
1351
1351
|
// ********************************************************************
|
|
1352
|
-
/**
|
|
1353
|
-
* class for ASN.1 DER GeneralizedTime
|
|
1354
|
-
* @name KJUR.asn1.DERGeneralizedTime
|
|
1355
|
-
* @class class for ASN.1 DER GeneralizedTime
|
|
1356
|
-
* @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})
|
|
1357
|
-
* @property {Boolean} withMillis flag to show milliseconds or not
|
|
1358
|
-
* @extends KJUR.asn1.DERAbstractTime
|
|
1359
|
-
* @description
|
|
1360
|
-
* <br/>
|
|
1361
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
1362
|
-
* following properties:
|
|
1363
|
-
* <ul>
|
|
1364
|
-
* <li>str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')</li>
|
|
1365
|
-
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
1366
|
-
* <li>date - specify Date object.</li>
|
|
1367
|
-
* <li>millis - specify flag to show milliseconds (from 1.0.6)</li>
|
|
1368
|
-
* </ul>
|
|
1369
|
-
* NOTE1: 'params' can be omitted.
|
|
1370
|
-
* NOTE2: 'withMillis' property is supported from asn1 1.0.6.
|
|
1352
|
+
/**
|
|
1353
|
+
* class for ASN.1 DER GeneralizedTime
|
|
1354
|
+
* @name KJUR.asn1.DERGeneralizedTime
|
|
1355
|
+
* @class class for ASN.1 DER GeneralizedTime
|
|
1356
|
+
* @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})
|
|
1357
|
+
* @property {Boolean} withMillis flag to show milliseconds or not
|
|
1358
|
+
* @extends KJUR.asn1.DERAbstractTime
|
|
1359
|
+
* @description
|
|
1360
|
+
* <br/>
|
|
1361
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
1362
|
+
* following properties:
|
|
1363
|
+
* <ul>
|
|
1364
|
+
* <li>str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')</li>
|
|
1365
|
+
* <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
|
|
1366
|
+
* <li>date - specify Date object.</li>
|
|
1367
|
+
* <li>millis - specify flag to show milliseconds (from 1.0.6)</li>
|
|
1368
|
+
* </ul>
|
|
1369
|
+
* NOTE1: 'params' can be omitted.
|
|
1370
|
+
* NOTE2: 'withMillis' property is supported from asn1 1.0.6.
|
|
1371
1371
|
*/
|
|
1372
1372
|
KJUR.asn1.DERGeneralizedTime = function (params) {
|
|
1373
1373
|
KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);
|
|
1374
1374
|
this.hT = "18";
|
|
1375
1375
|
this.withMillis = false;
|
|
1376
|
-
/**
|
|
1377
|
-
* set value by a Date object
|
|
1378
|
-
* @name setByDate
|
|
1379
|
-
* @memberOf KJUR.asn1.DERGeneralizedTime#
|
|
1380
|
-
* @function
|
|
1381
|
-
* @param {Date} dateObject Date object to set ASN.1 value(V)
|
|
1382
|
-
* @example
|
|
1383
|
-
* When you specify UTC time, use 'Date.UTC' method like this:<br/>
|
|
1384
|
-
* o1 = new DERUTCTime();
|
|
1385
|
-
* o1.setByDate(date);
|
|
1386
|
-
*
|
|
1387
|
-
* date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59
|
|
1376
|
+
/**
|
|
1377
|
+
* set value by a Date object
|
|
1378
|
+
* @name setByDate
|
|
1379
|
+
* @memberOf KJUR.asn1.DERGeneralizedTime#
|
|
1380
|
+
* @function
|
|
1381
|
+
* @param {Date} dateObject Date object to set ASN.1 value(V)
|
|
1382
|
+
* @example
|
|
1383
|
+
* When you specify UTC time, use 'Date.UTC' method like this:<br/>
|
|
1384
|
+
* o1 = new DERUTCTime();
|
|
1385
|
+
* o1.setByDate(date);
|
|
1386
|
+
*
|
|
1387
|
+
* date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59
|
|
1388
1388
|
*/
|
|
1389
1389
|
this.setByDate = function (dateObject) {
|
|
1390
1390
|
this.hTLV = null;
|
|
@@ -1418,19 +1418,19 @@ KJUR.asn1.DERGeneralizedTime = function (params) {
|
|
|
1418
1418
|
};
|
|
1419
1419
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);
|
|
1420
1420
|
// ********************************************************************
|
|
1421
|
-
/**
|
|
1422
|
-
* class for ASN.1 DER Sequence
|
|
1423
|
-
* @name KJUR.asn1.DERSequence
|
|
1424
|
-
* @class class for ASN.1 DER Sequence
|
|
1425
|
-
* @extends KJUR.asn1.DERAbstractStructured
|
|
1426
|
-
* @description
|
|
1427
|
-
* <br/>
|
|
1428
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
1429
|
-
* following properties:
|
|
1430
|
-
* <ul>
|
|
1431
|
-
* <li>array - specify array of ASN1Object to set elements of content</li>
|
|
1432
|
-
* </ul>
|
|
1433
|
-
* NOTE: 'params' can be omitted.
|
|
1421
|
+
/**
|
|
1422
|
+
* class for ASN.1 DER Sequence
|
|
1423
|
+
* @name KJUR.asn1.DERSequence
|
|
1424
|
+
* @class class for ASN.1 DER Sequence
|
|
1425
|
+
* @extends KJUR.asn1.DERAbstractStructured
|
|
1426
|
+
* @description
|
|
1427
|
+
* <br/>
|
|
1428
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
1429
|
+
* following properties:
|
|
1430
|
+
* <ul>
|
|
1431
|
+
* <li>array - specify array of ASN1Object to set elements of content</li>
|
|
1432
|
+
* </ul>
|
|
1433
|
+
* NOTE: 'params' can be omitted.
|
|
1434
1434
|
*/
|
|
1435
1435
|
KJUR.asn1.DERSequence = function (params) {
|
|
1436
1436
|
KJUR.asn1.DERSequence.superclass.constructor.call(this, params);
|
|
@@ -1447,21 +1447,21 @@ KJUR.asn1.DERSequence = function (params) {
|
|
|
1447
1447
|
};
|
|
1448
1448
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);
|
|
1449
1449
|
// ********************************************************************
|
|
1450
|
-
/**
|
|
1451
|
-
* class for ASN.1 DER Set
|
|
1452
|
-
* @name KJUR.asn1.DERSet
|
|
1453
|
-
* @class class for ASN.1 DER Set
|
|
1454
|
-
* @extends KJUR.asn1.DERAbstractStructured
|
|
1455
|
-
* @description
|
|
1456
|
-
* <br/>
|
|
1457
|
-
* As for argument 'params' for constructor, you can specify one of
|
|
1458
|
-
* following properties:
|
|
1459
|
-
* <ul>
|
|
1460
|
-
* <li>array - specify array of ASN1Object to set elements of content</li>
|
|
1461
|
-
* <li>sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.</li>
|
|
1462
|
-
* </ul>
|
|
1463
|
-
* NOTE1: 'params' can be omitted.<br/>
|
|
1464
|
-
* NOTE2: sortflag is supported since 1.0.5.
|
|
1450
|
+
/**
|
|
1451
|
+
* class for ASN.1 DER Set
|
|
1452
|
+
* @name KJUR.asn1.DERSet
|
|
1453
|
+
* @class class for ASN.1 DER Set
|
|
1454
|
+
* @extends KJUR.asn1.DERAbstractStructured
|
|
1455
|
+
* @description
|
|
1456
|
+
* <br/>
|
|
1457
|
+
* As for argument 'params' for constructor, you can specify one of
|
|
1458
|
+
* following properties:
|
|
1459
|
+
* <ul>
|
|
1460
|
+
* <li>array - specify array of ASN1Object to set elements of content</li>
|
|
1461
|
+
* <li>sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.</li>
|
|
1462
|
+
* </ul>
|
|
1463
|
+
* NOTE1: 'params' can be omitted.<br/>
|
|
1464
|
+
* NOTE2: sortflag is supported since 1.0.5.
|
|
1465
1465
|
*/
|
|
1466
1466
|
KJUR.asn1.DERSet = function (params) {
|
|
1467
1467
|
KJUR.asn1.DERSet.superclass.constructor.call(this, params);
|
|
@@ -1483,29 +1483,29 @@ KJUR.asn1.DERSet = function (params) {
|
|
|
1483
1483
|
};
|
|
1484
1484
|
_yahoo.YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);
|
|
1485
1485
|
// ********************************************************************
|
|
1486
|
-
/**
|
|
1487
|
-
* class for ASN.1 DER TaggedObject
|
|
1488
|
-
* @name KJUR.asn1.DERTaggedObject
|
|
1489
|
-
* @class class for ASN.1 DER TaggedObject
|
|
1490
|
-
* @extends KJUR.asn1.ASN1Object
|
|
1491
|
-
* @description
|
|
1492
|
-
* <br/>
|
|
1493
|
-
* Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.
|
|
1494
|
-
* For example, if you find '[1]' tag in a ASN.1 dump,
|
|
1495
|
-
* 'tagNoHex' will be 'a1'.
|
|
1496
|
-
* <br/>
|
|
1497
|
-
* As for optional argument 'params' for constructor, you can specify *ANY* of
|
|
1498
|
-
* following properties:
|
|
1499
|
-
* <ul>
|
|
1500
|
-
* <li>explicit - specify true if this is explicit tag otherwise false
|
|
1501
|
-
* (default is 'true').</li>
|
|
1502
|
-
* <li>tag - specify tag (default is 'a0' which means [0])</li>
|
|
1503
|
-
* <li>obj - specify ASN1Object which is tagged</li>
|
|
1504
|
-
* </ul>
|
|
1505
|
-
* @example
|
|
1506
|
-
* d1 = new KJUR.asn1.DERUTF8String({'str':'a'});
|
|
1507
|
-
* d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});
|
|
1508
|
-
* hex = d2.getEncodedHex();
|
|
1486
|
+
/**
|
|
1487
|
+
* class for ASN.1 DER TaggedObject
|
|
1488
|
+
* @name KJUR.asn1.DERTaggedObject
|
|
1489
|
+
* @class class for ASN.1 DER TaggedObject
|
|
1490
|
+
* @extends KJUR.asn1.ASN1Object
|
|
1491
|
+
* @description
|
|
1492
|
+
* <br/>
|
|
1493
|
+
* Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.
|
|
1494
|
+
* For example, if you find '[1]' tag in a ASN.1 dump,
|
|
1495
|
+
* 'tagNoHex' will be 'a1'.
|
|
1496
|
+
* <br/>
|
|
1497
|
+
* As for optional argument 'params' for constructor, you can specify *ANY* of
|
|
1498
|
+
* following properties:
|
|
1499
|
+
* <ul>
|
|
1500
|
+
* <li>explicit - specify true if this is explicit tag otherwise false
|
|
1501
|
+
* (default is 'true').</li>
|
|
1502
|
+
* <li>tag - specify tag (default is 'a0' which means [0])</li>
|
|
1503
|
+
* <li>obj - specify ASN1Object which is tagged</li>
|
|
1504
|
+
* </ul>
|
|
1505
|
+
* @example
|
|
1506
|
+
* d1 = new KJUR.asn1.DERUTF8String({'str':'a'});
|
|
1507
|
+
* d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});
|
|
1508
|
+
* hex = d2.getEncodedHex();
|
|
1509
1509
|
*/
|
|
1510
1510
|
KJUR.asn1.DERTaggedObject = function (params) {
|
|
1511
1511
|
KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);
|
|
@@ -1513,14 +1513,14 @@ KJUR.asn1.DERTaggedObject = function (params) {
|
|
|
1513
1513
|
this.hV = '';
|
|
1514
1514
|
this.isExplicit = true;
|
|
1515
1515
|
this.asn1Object = null;
|
|
1516
|
-
/**
|
|
1517
|
-
* set value by an ASN1Object
|
|
1518
|
-
* @name setString
|
|
1519
|
-
* @memberOf KJUR.asn1.DERTaggedObject#
|
|
1520
|
-
* @function
|
|
1521
|
-
* @param {Boolean} isExplicitFlag flag for explicit/implicit tag
|
|
1522
|
-
* @param {Integer} tagNoHex hexadecimal string of ASN.1 tag
|
|
1523
|
-
* @param {ASN1Object} asn1Object ASN.1 to encapsulate
|
|
1516
|
+
/**
|
|
1517
|
+
* set value by an ASN1Object
|
|
1518
|
+
* @name setString
|
|
1519
|
+
* @memberOf KJUR.asn1.DERTaggedObject#
|
|
1520
|
+
* @function
|
|
1521
|
+
* @param {Boolean} isExplicitFlag flag for explicit/implicit tag
|
|
1522
|
+
* @param {Integer} tagNoHex hexadecimal string of ASN.1 tag
|
|
1523
|
+
* @param {ASN1Object} asn1Object ASN.1 to encapsulate
|
|
1524
1524
|
*/
|
|
1525
1525
|
this.setASN1Object = function (isExplicitFlag, tagNoHex, asn1Object) {
|
|
1526
1526
|
this.hT = tagNoHex;
|