@openclaw/slack 2026.7.1-beta.2 → 2026.7.1-beta.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/dist/{account-inspect-DOtQbKkB.js → account-inspect-Di7ditqZ.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-BPCiCe8y.js → accounts-BOJJiHSr.js} +14 -1
- package/dist/accounts.runtime-DWvaCb-X.js +2 -0
- package/dist/{action-runtime-E9QZMf0z.js → action-runtime-DoQGk_8D.js} +36 -32
- package/dist/action-runtime.runtime-BABj3aM-.js +2 -0
- package/dist/{actions-CqRHPciJ.js → actions-DMpDmKEA.js} +211 -57
- package/dist/actions.runtime-C103_BPW.js +2 -0
- package/dist/api.js +13 -13
- package/dist/{approval-handler.runtime-BqNO_HC_.js → approval-handler.runtime-CIUbOt5T.js} +2 -2
- package/dist/{channel-jO8Jdkge.js → channel-CG29WLVd.js} +198 -87
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-CDOZ8V3p.js → channel.setup-Dq6syTNU.js} +3 -3
- package/dist/{client-DG9cyk55.js → client-DGxwSL7f.js} +0 -1
- package/dist/{directory-config-DDVHDmrN.js → directory-config-BZuS8141.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DC-YA5SQ.js → directory-live-BNsxCgqP.js} +2 -2
- package/dist/format-YCNoNkM2.js +107 -0
- package/dist/http-routes-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{interactive-replies-D-22gTp3.js → interactive-replies-CXpT-vA_.js} +13 -2
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api--zYyTqrR.js → message-tool-api-BgWKyu2r.js} +11 -4
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-BQ7P93ll.js → monitor-D6Km2CFH.js} +3 -3
- package/dist/outbound-adapter-DVoBfBW5.js +272 -0
- package/dist/{pipeline.runtime-cxw6Zihc.js → pipeline.runtime-0wEFX2CS.js} +184 -260
- package/dist/{plugin-routes-B9PvcDQJ.js → plugin-routes-CLp4obpN.js} +1 -1
- package/dist/{policy-DAE6BTN3.js → policy-Dj-puVPb.js} +10 -4
- package/dist/{probe-DFKt9Ute.js → probe-CuwRDE5j.js} +10 -4
- package/dist/{provider-BdoeWKr8.js → provider-Cot8h818.js} +153 -120
- package/dist/{relay-source-OcqQzKfX.js → relay-source-CU1LhyBj.js} +2 -2
- package/dist/{replies-D_G-EPr8.js → replies-Bbx6pG_B.js} +4 -3
- package/dist/{reply-blocks-CfJqf7eq.js → reply-blocks-BGQ6zSqM.js} +184 -36
- package/dist/{resolve-channels-eniB45fy.js → resolve-channels-CstkChBE.js} +1 -1
- package/dist/{resolve-users-DDKzl37a.js → resolve-users-C3NP2c-Q.js} +1 -1
- package/dist/{runtime-api-DHJ8ntLr.js → runtime-api-CEmqYxR-.js} +1 -1
- package/dist/runtime-api.js +12 -12
- package/dist/{scopes-BdVdJxFf.js → scopes-DCWVD5-8.js} +2 -2
- package/dist/{send-Dg6U9K7_.js → send-DKDXoeoV.js} +392 -225
- package/dist/send.runtime-GPRa63l1.js +2 -0
- package/dist/{setup-core-BCGzyZhx.js → setup-core-fGd6Gquy.js} +4 -3
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-D7xdZLxB.js → setup-surface-Dv2fIJNB.js} +5 -5
- package/dist/{shared-iMaNxOIL.js → shared-CosfcFri.js} +5 -5
- package/dist/{slash-dispatch.runtime-DVhs_fpQ.js → slash-dispatch.runtime-Ccm3quU1.js} +1 -1
- package/node_modules/@slack/web-api/dist/chat-stream.d.ts +6 -0
- package/node_modules/@slack/web-api/dist/chat-stream.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/chat-stream.js +8 -0
- package/node_modules/@slack/web-api/dist/chat-stream.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/assistant.d.ts +1 -1
- package/node_modules/@slack/web-api/dist/types/request/assistant.d.ts.map +1 -1
- package/node_modules/@slack/web-api/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/assert/strict.d.ts +10 -1
- package/node_modules/@types/node/assert.d.ts +144 -17
- package/node_modules/@types/node/async_hooks.d.ts +9 -9
- package/node_modules/@types/node/buffer.d.ts +64 -30
- package/node_modules/@types/node/child_process.d.ts +17 -21
- package/node_modules/@types/node/cluster.d.ts +13 -13
- package/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +471 -575
- package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
- package/node_modules/@types/node/dns.d.ts +15 -15
- package/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +7 -4
- package/node_modules/@types/node/fs.d.ts +24 -18
- package/node_modules/@types/node/globals.d.ts +4 -4
- package/node_modules/@types/node/http.d.ts +30 -5
- package/node_modules/@types/node/http2.d.ts +2 -1
- package/node_modules/@types/node/index.d.ts +1 -3
- package/node_modules/@types/node/inspector.d.ts +1 -1
- package/node_modules/@types/node/module.d.ts +16 -45
- package/node_modules/@types/node/net.d.ts +1 -1
- package/node_modules/@types/node/os.d.ts +2 -2
- package/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/node/perf_hooks.d.ts +1 -9
- package/node_modules/@types/node/process.d.ts +25 -12
- package/node_modules/@types/node/quic.d.ts +92 -11
- package/node_modules/@types/node/readline.d.ts +12 -11
- package/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/node/sqlite.d.ts +56 -1
- package/node_modules/@types/node/stream/iter.d.ts +150 -0
- package/node_modules/@types/node/stream/promises.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +1 -1
- package/node_modules/@types/node/stream.d.ts +37 -5
- package/node_modules/@types/node/test/reporters.d.ts +1 -1
- package/node_modules/@types/node/test.d.ts +120 -10
- package/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
- package/node_modules/@types/node/url.d.ts +3 -3
- package/node_modules/@types/node/util/types.d.ts +1 -1
- package/node_modules/@types/node/util.d.ts +22 -22
- package/node_modules/@types/node/v8.d.ts +85 -3
- package/node_modules/@types/node/vm.d.ts +9 -9
- package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/node/worker_threads.d.ts +10 -12
- package/node_modules/@types/node/zlib.d.ts +3 -3
- package/node_modules/body-parser/README.md +16 -1
- package/node_modules/body-parser/index.js +4 -20
- package/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/body-parser/node_modules/content-type/README.md +69 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/body-parser/package.json +23 -10
- package/node_modules/range-parser/README.md +13 -12
- package/node_modules/range-parser/index.js +27 -8
- package/node_modules/range-parser/package.json +12 -8
- package/node_modules/semver/classes/range.js +6 -2
- package/node_modules/semver/package.json +1 -1
- package/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/side-channel/README.md +1 -1
- package/node_modules/side-channel/index.js +5 -2
- package/node_modules/side-channel/package.json +10 -10
- package/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/node_modules/undici-types/agent.d.ts +0 -2
- package/node_modules/undici-types/client.d.ts +25 -19
- package/node_modules/undici-types/dispatcher.d.ts +7 -33
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/fetch.d.ts +24 -4
- package/node_modules/undici-types/h2c-client.d.ts +6 -6
- package/node_modules/undici-types/handlers.d.ts +1 -2
- package/node_modules/undici-types/header.d.ts +5 -0
- package/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +0 -2
- package/node_modules/undici-types/proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
- package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/webidl.d.ts +0 -1
- package/npm-shrinkwrap.json +55 -56
- package/openclaw.plugin.json +46 -0
- package/package.json +6 -6
- package/dist/accounts.runtime-CgWgzjLX.js +0 -2
- package/dist/action-runtime.runtime-BQrVgSOq.js +0 -2
- package/dist/actions.runtime-Dl6AfO_g.js +0 -2
- package/dist/errors-CZtmv-h0.js +0 -107
- package/dist/outbound-adapter-BHUtpXz0.js +0 -188
- package/dist/send.runtime-a-O4PP2B.js +0 -2
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert/strict.d.ts +0 -59
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert.d.ts +0 -950
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/async_hooks.d.ts +0 -711
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.buffer.d.ts +0 -466
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.d.ts +0 -1765
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/child_process.d.ts +0 -1366
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/cluster.d.ts +0 -432
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/console.d.ts +0 -93
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/constants.d.ts +0 -14
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/crypto.d.ts +0 -4058
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/dgram.d.ts +0 -537
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/diagnostics_channel.d.ts +0 -552
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns/promises.d.ts +0 -497
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns.d.ts +0 -876
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/domain.d.ts +0 -150
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/events.d.ts +0 -1008
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs/promises.d.ts +0 -1468
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +0 -4780
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.d.ts +0 -150
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.typedarray.d.ts +0 -101
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/http.d.ts +0 -2147
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/http2.d.ts +0 -2485
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +0 -400
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/index.d.ts +0 -117
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.d.ts +0 -264
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.generated.d.ts +0 -4406
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +0 -755
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/net.d.ts +0 -970
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/os.d.ts +0 -498
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +0 -155
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/path.d.ts +0 -178
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/perf_hooks.d.ts +0 -612
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +0 -2204
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/punycode.d.ts +0 -89
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/querystring.d.ts +0 -139
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/quic.d.ts +0 -897
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline/promises.d.ts +0 -158
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline.d.ts +0 -507
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/repl.d.ts +0 -420
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/sea.d.ts +0 -47
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts +0 -1068
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/consumers.d.ts +0 -114
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/iter.d.ts +0 -301
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/promises.d.ts +0 -211
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/web.d.ts +0 -300
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream.d.ts +0 -1774
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/string_decoder.d.ts +0 -27
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/test/reporters.d.ts +0 -59
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +0 -2279
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +0 -149
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts +0 -1193
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/trace_events.d.ts +0 -103
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -462
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/index.d.ts +0 -119
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/index.d.ts +0 -119
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/tty.d.ts +0 -225
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/url.d.ts +0 -556
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +0 -1677
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/v8.d.ts +0 -980
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/vm.d.ts +0 -1136
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/wasi.d.ts +0 -131
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/events.d.ts +0 -106
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +0 -671
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib.d.ts +0 -589
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/ws/node_modules/@types/node/assert/strict.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/assert.d.ts +0 -950
- package/node_modules/@types/ws/node_modules/@types/node/async_hooks.d.ts +0 -711
- package/node_modules/@types/ws/node_modules/@types/node/buffer.buffer.d.ts +0 -466
- package/node_modules/@types/ws/node_modules/@types/node/buffer.d.ts +0 -1765
- package/node_modules/@types/ws/node_modules/@types/node/child_process.d.ts +0 -1366
- package/node_modules/@types/ws/node_modules/@types/node/cluster.d.ts +0 -432
- package/node_modules/@types/ws/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/console.d.ts +0 -93
- package/node_modules/@types/ws/node_modules/@types/node/constants.d.ts +0 -14
- package/node_modules/@types/ws/node_modules/@types/node/crypto.d.ts +0 -4058
- package/node_modules/@types/ws/node_modules/@types/node/dgram.d.ts +0 -537
- package/node_modules/@types/ws/node_modules/@types/node/diagnostics_channel.d.ts +0 -552
- package/node_modules/@types/ws/node_modules/@types/node/dns/promises.d.ts +0 -497
- package/node_modules/@types/ws/node_modules/@types/node/dns.d.ts +0 -876
- package/node_modules/@types/ws/node_modules/@types/node/domain.d.ts +0 -150
- package/node_modules/@types/ws/node_modules/@types/node/events.d.ts +0 -1008
- package/node_modules/@types/ws/node_modules/@types/node/fs/promises.d.ts +0 -1468
- package/node_modules/@types/ws/node_modules/@types/node/fs.d.ts +0 -4780
- package/node_modules/@types/ws/node_modules/@types/node/globals.d.ts +0 -150
- package/node_modules/@types/ws/node_modules/@types/node/globals.typedarray.d.ts +0 -101
- package/node_modules/@types/ws/node_modules/@types/node/http.d.ts +0 -2147
- package/node_modules/@types/ws/node_modules/@types/node/http2.d.ts +0 -2485
- package/node_modules/@types/ws/node_modules/@types/node/https.d.ts +0 -400
- package/node_modules/@types/ws/node_modules/@types/node/index.d.ts +0 -117
- package/node_modules/@types/ws/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/ws/node_modules/@types/node/inspector.d.ts +0 -264
- package/node_modules/@types/ws/node_modules/@types/node/inspector.generated.d.ts +0 -4406
- package/node_modules/@types/ws/node_modules/@types/node/module.d.ts +0 -755
- package/node_modules/@types/ws/node_modules/@types/node/net.d.ts +0 -970
- package/node_modules/@types/ws/node_modules/@types/node/os.d.ts +0 -498
- package/node_modules/@types/ws/node_modules/@types/node/package.json +0 -155
- package/node_modules/@types/ws/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/ws/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/ws/node_modules/@types/node/path.d.ts +0 -178
- package/node_modules/@types/ws/node_modules/@types/node/perf_hooks.d.ts +0 -612
- package/node_modules/@types/ws/node_modules/@types/node/process.d.ts +0 -2204
- package/node_modules/@types/ws/node_modules/@types/node/punycode.d.ts +0 -89
- package/node_modules/@types/ws/node_modules/@types/node/querystring.d.ts +0 -139
- package/node_modules/@types/ws/node_modules/@types/node/quic.d.ts +0 -897
- package/node_modules/@types/ws/node_modules/@types/node/readline/promises.d.ts +0 -158
- package/node_modules/@types/ws/node_modules/@types/node/readline.d.ts +0 -507
- package/node_modules/@types/ws/node_modules/@types/node/repl.d.ts +0 -420
- package/node_modules/@types/ws/node_modules/@types/node/sea.d.ts +0 -47
- package/node_modules/@types/ws/node_modules/@types/node/sqlite.d.ts +0 -1068
- package/node_modules/@types/ws/node_modules/@types/node/stream/consumers.d.ts +0 -114
- package/node_modules/@types/ws/node_modules/@types/node/stream/iter.d.ts +0 -301
- package/node_modules/@types/ws/node_modules/@types/node/stream/promises.d.ts +0 -211
- package/node_modules/@types/ws/node_modules/@types/node/stream/web.d.ts +0 -300
- package/node_modules/@types/ws/node_modules/@types/node/stream.d.ts +0 -1774
- package/node_modules/@types/ws/node_modules/@types/node/string_decoder.d.ts +0 -27
- package/node_modules/@types/ws/node_modules/@types/node/test/reporters.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/test.d.ts +0 -2279
- package/node_modules/@types/ws/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/node_modules/@types/ws/node_modules/@types/node/timers.d.ts +0 -149
- package/node_modules/@types/ws/node_modules/@types/node/tls.d.ts +0 -1193
- package/node_modules/@types/ws/node_modules/@types/node/trace_events.d.ts +0 -103
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -462
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/index.d.ts +0 -119
- package/node_modules/@types/ws/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/ws/node_modules/@types/node/ts5.7/index.d.ts +0 -119
- package/node_modules/@types/ws/node_modules/@types/node/tty.d.ts +0 -225
- package/node_modules/@types/ws/node_modules/@types/node/url.d.ts +0 -556
- package/node_modules/@types/ws/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/ws/node_modules/@types/node/util.d.ts +0 -1677
- package/node_modules/@types/ws/node_modules/@types/node/v8.d.ts +0 -980
- package/node_modules/@types/ws/node_modules/@types/node/vm.d.ts +0 -1136
- package/node_modules/@types/ws/node_modules/@types/node/wasi.d.ts +0 -131
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/events.d.ts +0 -106
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/ws/node_modules/@types/node/worker_threads.d.ts +0 -671
- package/node_modules/@types/ws/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/@types/ws/node_modules/@types/node/zlib.d.ts +0 -589
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare module "node:crypto" {
|
|
2
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
3
|
-
import
|
|
3
|
+
import { Transform, TransformOptions, Writable, WritableOptions } from "node:stream";
|
|
4
4
|
import { PeerCertificate } from "node:tls";
|
|
5
5
|
/**
|
|
6
6
|
* SPKAC is a Certificate Signing Request mechanism originally implemented by
|
|
@@ -27,7 +27,7 @@ declare module "node:crypto" {
|
|
|
27
27
|
* @param encoding The `encoding` of the `spkac` string.
|
|
28
28
|
* @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
|
|
29
29
|
*/
|
|
30
|
-
static exportChallenge(spkac: BinaryLike): NonSharedBuffer;
|
|
30
|
+
static exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer;
|
|
31
31
|
/**
|
|
32
32
|
* ```js
|
|
33
33
|
* const { Certificate } = await import('node:crypto');
|
|
@@ -40,7 +40,7 @@ declare module "node:crypto" {
|
|
|
40
40
|
* @param encoding The `encoding` of the `spkac` string.
|
|
41
41
|
* @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
|
|
42
42
|
*/
|
|
43
|
-
static exportPublicKey(spkac: BinaryLike, encoding?:
|
|
43
|
+
static exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer;
|
|
44
44
|
/**
|
|
45
45
|
* ```js
|
|
46
46
|
* import { Buffer } from 'node:buffer';
|
|
@@ -54,122 +54,34 @@ declare module "node:crypto" {
|
|
|
54
54
|
* @param encoding The `encoding` of the `spkac` string.
|
|
55
55
|
* @return `true` if the given `spkac` data structure is valid, `false` otherwise.
|
|
56
56
|
*/
|
|
57
|
-
static verifySpkac(spkac:
|
|
57
|
+
static verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean;
|
|
58
58
|
/**
|
|
59
59
|
* @deprecated
|
|
60
|
-
* @param spkac
|
|
60
|
+
* @param encoding The `encoding` of the `spkac` string.
|
|
61
61
|
* @returns The challenge component of the `spkac` data structure,
|
|
62
62
|
* which includes a public key and a challenge.
|
|
63
63
|
*/
|
|
64
|
-
exportChallenge(spkac: BinaryLike): NonSharedBuffer;
|
|
64
|
+
exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer;
|
|
65
65
|
/**
|
|
66
66
|
* @deprecated
|
|
67
|
-
* @param spkac
|
|
68
67
|
* @param encoding The encoding of the spkac string.
|
|
69
68
|
* @returns The public key component of the `spkac` data structure,
|
|
70
69
|
* which includes a public key and a challenge.
|
|
71
70
|
*/
|
|
72
|
-
exportPublicKey(spkac: BinaryLike, encoding?:
|
|
71
|
+
exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer;
|
|
73
72
|
/**
|
|
74
73
|
* @deprecated
|
|
75
|
-
* @param spkac
|
|
74
|
+
* @param encoding The `encoding` of the `spkac` string.
|
|
76
75
|
* @returns `true` if the given `spkac` data structure is valid,
|
|
77
76
|
* `false` otherwise.
|
|
78
77
|
*/
|
|
79
|
-
verifySpkac(spkac:
|
|
80
|
-
}
|
|
81
|
-
namespace constants {
|
|
82
|
-
// https://nodejs.org/dist/latest-v25.x/docs/api/crypto.html#crypto-constants
|
|
83
|
-
const OPENSSL_VERSION_NUMBER: number;
|
|
84
|
-
/** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
|
|
85
|
-
const SSL_OP_ALL: number;
|
|
86
|
-
/** Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3 */
|
|
87
|
-
const SSL_OP_ALLOW_NO_DHE_KEX: number;
|
|
88
|
-
/** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
|
|
89
|
-
const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
|
|
90
|
-
/** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
|
|
91
|
-
const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
|
|
92
|
-
/** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */
|
|
93
|
-
const SSL_OP_CISCO_ANYCONNECT: number;
|
|
94
|
-
/** Instructs OpenSSL to turn on cookie exchange. */
|
|
95
|
-
const SSL_OP_COOKIE_EXCHANGE: number;
|
|
96
|
-
/** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
|
|
97
|
-
const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
|
|
98
|
-
/** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
|
|
99
|
-
const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
|
|
100
|
-
/** Allows initial connection to servers that do not support RI. */
|
|
101
|
-
const SSL_OP_LEGACY_SERVER_CONNECT: number;
|
|
102
|
-
/** Instructs OpenSSL to disable support for SSL/TLS compression. */
|
|
103
|
-
const SSL_OP_NO_COMPRESSION: number;
|
|
104
|
-
/** Instructs OpenSSL to disable encrypt-then-MAC. */
|
|
105
|
-
const SSL_OP_NO_ENCRYPT_THEN_MAC: number;
|
|
106
|
-
const SSL_OP_NO_QUERY_MTU: number;
|
|
107
|
-
/** Instructs OpenSSL to disable renegotiation. */
|
|
108
|
-
const SSL_OP_NO_RENEGOTIATION: number;
|
|
109
|
-
/** Instructs OpenSSL to always start a new session when performing renegotiation. */
|
|
110
|
-
const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
|
|
111
|
-
/** Instructs OpenSSL to turn off SSL v2 */
|
|
112
|
-
const SSL_OP_NO_SSLv2: number;
|
|
113
|
-
/** Instructs OpenSSL to turn off SSL v3 */
|
|
114
|
-
const SSL_OP_NO_SSLv3: number;
|
|
115
|
-
/** Instructs OpenSSL to disable use of RFC4507bis tickets. */
|
|
116
|
-
const SSL_OP_NO_TICKET: number;
|
|
117
|
-
/** Instructs OpenSSL to turn off TLS v1 */
|
|
118
|
-
const SSL_OP_NO_TLSv1: number;
|
|
119
|
-
/** Instructs OpenSSL to turn off TLS v1.1 */
|
|
120
|
-
const SSL_OP_NO_TLSv1_1: number;
|
|
121
|
-
/** Instructs OpenSSL to turn off TLS v1.2 */
|
|
122
|
-
const SSL_OP_NO_TLSv1_2: number;
|
|
123
|
-
/** Instructs OpenSSL to turn off TLS v1.3 */
|
|
124
|
-
const SSL_OP_NO_TLSv1_3: number;
|
|
125
|
-
/** Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if `SSL_OP_CIPHER_SERVER_PREFERENCE` is not enabled. */
|
|
126
|
-
const SSL_OP_PRIORITIZE_CHACHA: number;
|
|
127
|
-
/** Instructs OpenSSL to disable version rollback attack detection. */
|
|
128
|
-
const SSL_OP_TLS_ROLLBACK_BUG: number;
|
|
129
|
-
const ENGINE_METHOD_RSA: number;
|
|
130
|
-
const ENGINE_METHOD_DSA: number;
|
|
131
|
-
const ENGINE_METHOD_DH: number;
|
|
132
|
-
const ENGINE_METHOD_RAND: number;
|
|
133
|
-
const ENGINE_METHOD_EC: number;
|
|
134
|
-
const ENGINE_METHOD_CIPHERS: number;
|
|
135
|
-
const ENGINE_METHOD_DIGESTS: number;
|
|
136
|
-
const ENGINE_METHOD_PKEY_METHS: number;
|
|
137
|
-
const ENGINE_METHOD_PKEY_ASN1_METHS: number;
|
|
138
|
-
const ENGINE_METHOD_ALL: number;
|
|
139
|
-
const ENGINE_METHOD_NONE: number;
|
|
140
|
-
const DH_CHECK_P_NOT_SAFE_PRIME: number;
|
|
141
|
-
const DH_CHECK_P_NOT_PRIME: number;
|
|
142
|
-
const DH_UNABLE_TO_CHECK_GENERATOR: number;
|
|
143
|
-
const DH_NOT_SUITABLE_GENERATOR: number;
|
|
144
|
-
const RSA_PKCS1_PADDING: number;
|
|
145
|
-
const RSA_SSLV23_PADDING: number;
|
|
146
|
-
const RSA_NO_PADDING: number;
|
|
147
|
-
const RSA_PKCS1_OAEP_PADDING: number;
|
|
148
|
-
const RSA_X931_PADDING: number;
|
|
149
|
-
const RSA_PKCS1_PSS_PADDING: number;
|
|
150
|
-
/** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
|
|
151
|
-
const RSA_PSS_SALTLEN_DIGEST: number;
|
|
152
|
-
/** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
|
|
153
|
-
const RSA_PSS_SALTLEN_MAX_SIGN: number;
|
|
154
|
-
/** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
|
|
155
|
-
const RSA_PSS_SALTLEN_AUTO: number;
|
|
156
|
-
const POINT_CONVERSION_COMPRESSED: number;
|
|
157
|
-
const POINT_CONVERSION_UNCOMPRESSED: number;
|
|
158
|
-
const POINT_CONVERSION_HYBRID: number;
|
|
159
|
-
/** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
|
|
160
|
-
const defaultCoreCipherList: string;
|
|
161
|
-
/** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
|
|
162
|
-
const defaultCipherList: string;
|
|
78
|
+
verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean;
|
|
163
79
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
* outputLength option can be used to specify the desired output length in bytes.
|
|
168
|
-
*/
|
|
80
|
+
/** @deprecated This property is deprecated. Please use `crypto.setFips()` and `crypto.getFips()` instead. */
|
|
81
|
+
var fips: boolean;
|
|
82
|
+
interface HashOptions extends TransformOptions {
|
|
169
83
|
outputLength?: number | undefined;
|
|
170
84
|
}
|
|
171
|
-
/** @deprecated since v10.0.0 */
|
|
172
|
-
const fips: boolean;
|
|
173
85
|
/**
|
|
174
86
|
* Creates and returns a `Hash` object that can be used to generate hash digests
|
|
175
87
|
* using the given `algorithm`. Optional `options` argument controls stream
|
|
@@ -212,6 +124,9 @@ declare module "node:crypto" {
|
|
|
212
124
|
* @param options `stream.transform` options
|
|
213
125
|
*/
|
|
214
126
|
function createHash(algorithm: string, options?: HashOptions): Hash;
|
|
127
|
+
interface HmacOptions extends TransformOptions {
|
|
128
|
+
encoding?: BufferEncoding | undefined;
|
|
129
|
+
}
|
|
215
130
|
/**
|
|
216
131
|
* Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
|
|
217
132
|
* Optional `options` argument controls stream behavior.
|
|
@@ -256,13 +171,7 @@ declare module "node:crypto" {
|
|
|
256
171
|
* @since v0.1.94
|
|
257
172
|
* @param options `stream.transform` options
|
|
258
173
|
*/
|
|
259
|
-
function createHmac(algorithm: string, key:
|
|
260
|
-
// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
|
|
261
|
-
type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary";
|
|
262
|
-
type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1";
|
|
263
|
-
type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
|
|
264
|
-
type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
|
|
265
|
-
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
|
|
174
|
+
function createHmac(algorithm: string, key: KeyLike, options?: HmacOptions): Hmac;
|
|
266
175
|
/**
|
|
267
176
|
* The `Hash` class is a utility for creating hash digests of data. It can be
|
|
268
177
|
* used in one of two ways:
|
|
@@ -327,7 +236,7 @@ declare module "node:crypto" {
|
|
|
327
236
|
* ```
|
|
328
237
|
* @since v0.1.92
|
|
329
238
|
*/
|
|
330
|
-
class Hash extends
|
|
239
|
+
class Hash extends Transform {
|
|
331
240
|
private constructor();
|
|
332
241
|
/**
|
|
333
242
|
* Creates a new `Hash` object that contains a deep copy of the internal state
|
|
@@ -373,8 +282,7 @@ declare module "node:crypto" {
|
|
|
373
282
|
* @since v0.1.92
|
|
374
283
|
* @param inputEncoding The `encoding` of the `data` string.
|
|
375
284
|
*/
|
|
376
|
-
update(data:
|
|
377
|
-
update(data: string, inputEncoding: Encoding): Hash;
|
|
285
|
+
update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Hash;
|
|
378
286
|
/**
|
|
379
287
|
* Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
|
|
380
288
|
* If `encoding` is provided a string will be returned; otherwise
|
|
@@ -386,7 +294,7 @@ declare module "node:crypto" {
|
|
|
386
294
|
* @param encoding The `encoding` of the return value.
|
|
387
295
|
*/
|
|
388
296
|
digest(): NonSharedBuffer;
|
|
389
|
-
digest(encoding:
|
|
297
|
+
digest(encoding: BufferEncoding): string;
|
|
390
298
|
}
|
|
391
299
|
/**
|
|
392
300
|
* The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
|
|
@@ -454,7 +362,7 @@ declare module "node:crypto" {
|
|
|
454
362
|
* ```
|
|
455
363
|
* @since v0.1.94
|
|
456
364
|
*/
|
|
457
|
-
class Hmac extends
|
|
365
|
+
class Hmac extends Transform {
|
|
458
366
|
private constructor();
|
|
459
367
|
/**
|
|
460
368
|
* Updates the `Hmac` content with the given `data`, the encoding of which
|
|
@@ -466,8 +374,7 @@ declare module "node:crypto" {
|
|
|
466
374
|
* @since v0.1.94
|
|
467
375
|
* @param inputEncoding The `encoding` of the `data` string.
|
|
468
376
|
*/
|
|
469
|
-
update(data:
|
|
470
|
-
update(data: string, inputEncoding: Encoding): Hmac;
|
|
377
|
+
update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Hmac;
|
|
471
378
|
/**
|
|
472
379
|
* Calculates the HMAC digest of all of the data passed using `hmac.update()`.
|
|
473
380
|
* If `encoding` is
|
|
@@ -479,9 +386,9 @@ declare module "node:crypto" {
|
|
|
479
386
|
* @param encoding The `encoding` of the return value.
|
|
480
387
|
*/
|
|
481
388
|
digest(): NonSharedBuffer;
|
|
482
|
-
digest(encoding:
|
|
389
|
+
digest(encoding: BufferEncoding): string;
|
|
483
390
|
}
|
|
484
|
-
type KeyFormat = "pem" | "der" | "jwk";
|
|
391
|
+
type KeyFormat = "pem" | "der" | "jwk" | "raw-public" | "raw-private" | "raw-seed";
|
|
485
392
|
type KeyObjectType = "secret" | "public" | "private";
|
|
486
393
|
type PublicKeyExportType = "pkcs1" | "spki";
|
|
487
394
|
type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1";
|
|
@@ -489,38 +396,60 @@ declare module "node:crypto" {
|
|
|
489
396
|
| SymmetricKeyExportOptions
|
|
490
397
|
| PublicKeyExportOptions
|
|
491
398
|
| PrivateKeyExportOptions
|
|
492
|
-
| JwkKeyExportOptions
|
|
399
|
+
| JwkKeyExportOptions
|
|
400
|
+
| RawPublicKeyExportOptions
|
|
401
|
+
| RawPrivateKeyExportOptions;
|
|
493
402
|
interface SymmetricKeyExportOptions {
|
|
494
403
|
format?: "buffer" | undefined;
|
|
495
404
|
}
|
|
496
405
|
interface PublicKeyExportOptions<T extends PublicKeyExportType = PublicKeyExportType> {
|
|
497
406
|
type: T;
|
|
498
|
-
format:
|
|
407
|
+
format: "pem" | "der";
|
|
499
408
|
}
|
|
500
409
|
interface PrivateKeyExportOptions<T extends PrivateKeyExportType = PrivateKeyExportType> {
|
|
501
410
|
type: T;
|
|
502
|
-
format:
|
|
411
|
+
format: "pem" | "der";
|
|
503
412
|
cipher?: string | undefined;
|
|
504
|
-
passphrase?:
|
|
413
|
+
passphrase?: BinaryLike | undefined;
|
|
505
414
|
}
|
|
506
415
|
interface JwkKeyExportOptions {
|
|
507
416
|
format: "jwk";
|
|
508
417
|
}
|
|
418
|
+
interface RawPublicKeyExportOptions {
|
|
419
|
+
format: "raw-public";
|
|
420
|
+
}
|
|
421
|
+
interface RawPrivateKeyExportOptions {
|
|
422
|
+
format: "raw-private" | "raw-seed";
|
|
423
|
+
}
|
|
509
424
|
interface KeyPairExportOptions<
|
|
510
425
|
TPublic extends PublicKeyExportType = PublicKeyExportType,
|
|
511
426
|
TPrivate extends PrivateKeyExportType = PrivateKeyExportType,
|
|
512
427
|
> {
|
|
513
|
-
publicKeyEncoding?:
|
|
514
|
-
|
|
428
|
+
publicKeyEncoding?:
|
|
429
|
+
| PublicKeyExportOptions<TPublic>
|
|
430
|
+
| RawPublicKeyExportOptions
|
|
431
|
+
| JwkKeyExportOptions
|
|
432
|
+
| undefined;
|
|
433
|
+
privateKeyEncoding?:
|
|
434
|
+
| PrivateKeyExportOptions<TPrivate>
|
|
435
|
+
| RawPrivateKeyExportOptions
|
|
436
|
+
| JwkKeyExportOptions
|
|
437
|
+
| undefined;
|
|
515
438
|
}
|
|
516
|
-
type KeyExportResult<T, Default> = T extends { format: infer F extends KeyFormat }
|
|
517
|
-
|
|
439
|
+
type KeyExportResult<T, Default> = T extends { format: infer F extends KeyFormat } ? {
|
|
440
|
+
"der": NonSharedBuffer;
|
|
441
|
+
"jwk": webcrypto.JsonWebKey;
|
|
442
|
+
"pem": string;
|
|
443
|
+
"raw-public": NonSharedBuffer;
|
|
444
|
+
"raw-private": NonSharedBuffer;
|
|
445
|
+
"raw-seed": NonSharedBuffer;
|
|
446
|
+
}[F]
|
|
518
447
|
: Default;
|
|
519
448
|
interface KeyPairExportResult<T extends KeyPairExportOptions> {
|
|
520
449
|
publicKey: KeyExportResult<T["publicKeyEncoding"], KeyObject>;
|
|
521
450
|
privateKey: KeyExportResult<T["privateKeyEncoding"], KeyObject>;
|
|
522
451
|
}
|
|
523
|
-
type KeyPairExportCallback<T extends KeyPairExportOptions> = (
|
|
452
|
+
type KeyPairExportCallback<T extends KeyPairExportOptions = {}> = (
|
|
524
453
|
err: Error | null,
|
|
525
454
|
publicKey: KeyExportResult<T["publicKeyEncoding"], KeyObject>,
|
|
526
455
|
privateKey: KeyExportResult<T["privateKeyEncoding"], KeyObject>,
|
|
@@ -542,33 +471,12 @@ declare module "node:crypto" {
|
|
|
542
471
|
| "x25519"
|
|
543
472
|
| "x448";
|
|
544
473
|
interface AsymmetricKeyDetails {
|
|
545
|
-
/**
|
|
546
|
-
* Key size in bits (RSA, DSA).
|
|
547
|
-
*/
|
|
548
474
|
modulusLength?: number;
|
|
549
|
-
/**
|
|
550
|
-
* Public exponent (RSA).
|
|
551
|
-
*/
|
|
552
475
|
publicExponent?: bigint;
|
|
553
|
-
/**
|
|
554
|
-
* Name of the message digest (RSA-PSS).
|
|
555
|
-
*/
|
|
556
476
|
hashAlgorithm?: string;
|
|
557
|
-
/**
|
|
558
|
-
* Name of the message digest used by MGF1 (RSA-PSS).
|
|
559
|
-
*/
|
|
560
477
|
mgf1HashAlgorithm?: string;
|
|
561
|
-
/**
|
|
562
|
-
* Minimal salt length in bytes (RSA-PSS).
|
|
563
|
-
*/
|
|
564
478
|
saltLength?: number;
|
|
565
|
-
/**
|
|
566
|
-
* Size of q in bits (DSA).
|
|
567
|
-
*/
|
|
568
479
|
divisorLength?: number;
|
|
569
|
-
/**
|
|
570
|
-
* Name of the curve (EC).
|
|
571
|
-
*/
|
|
572
480
|
namedCurve?: string;
|
|
573
481
|
}
|
|
574
482
|
/**
|
|
@@ -587,7 +495,11 @@ declare module "node:crypto" {
|
|
|
587
495
|
class KeyObject {
|
|
588
496
|
private constructor();
|
|
589
497
|
/**
|
|
590
|
-
*
|
|
498
|
+
* Returns the underlying `KeyObject` of a `CryptoKey`. The returned `KeyObject`
|
|
499
|
+
* does not retain any of the restrictions imposed by the Web Crypto API on the
|
|
500
|
+
* original `CryptoKey`, such as the allowed key usages, the algorithm or hash
|
|
501
|
+
* algorithm bindings, and the extractability flag. In particular, the underlying
|
|
502
|
+
* key material of the returned `KeyObject` can always be exported.
|
|
591
503
|
*
|
|
592
504
|
* ```js
|
|
593
505
|
* const { KeyObject } = await import('node:crypto');
|
|
@@ -608,7 +520,7 @@ declare module "node:crypto" {
|
|
|
608
520
|
static from(key: webcrypto.CryptoKey): KeyObject;
|
|
609
521
|
/**
|
|
610
522
|
* For asymmetric keys, this property represents the type of the key. See the
|
|
611
|
-
* supported [asymmetric key types](https://nodejs.org/docs/latest-
|
|
523
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types).
|
|
612
524
|
*
|
|
613
525
|
* This property is `undefined` for unrecognized `KeyObject` types and symmetric
|
|
614
526
|
* keys.
|
|
@@ -630,26 +542,18 @@ declare module "node:crypto" {
|
|
|
630
542
|
*/
|
|
631
543
|
asymmetricKeyDetails?: AsymmetricKeyDetails;
|
|
632
544
|
/**
|
|
633
|
-
* For symmetric keys, the following encoding options can be used:
|
|
634
|
-
*
|
|
635
|
-
* For public keys, the following encoding options can be used:
|
|
636
|
-
*
|
|
637
|
-
* For private keys, the following encoding options can be used:
|
|
638
|
-
*
|
|
639
545
|
* The result type depends on the selected encoding format, when PEM the
|
|
640
546
|
* result is a string, when DER it will be a buffer containing the data
|
|
641
|
-
* encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
* PKCS#1
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
* a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
|
|
652
|
-
* PKCS#1 and SEC1 encryption.
|
|
547
|
+
* encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. Raw formats return a
|
|
548
|
+
* `Buffer` containing the raw key material.
|
|
549
|
+
*
|
|
550
|
+
* Private keys can be encrypted by specifying a `cipher` and `passphrase`.
|
|
551
|
+
* The PKCS#8 `type` supports encryption with both PEM and DER `format` for any
|
|
552
|
+
* key algorithm. PKCS#1 and SEC1 can only be encrypted when the PEM `format` is
|
|
553
|
+
* used. For maximum compatibility, use PKCS#8 for encrypted private keys. Since
|
|
554
|
+
* PKCS#8 defines its own encryption mechanism, PEM-level encryption is not
|
|
555
|
+
* supported when encrypting a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption
|
|
556
|
+
* and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for PKCS#1 and SEC1 encryption.
|
|
653
557
|
* @since v11.6.0
|
|
654
558
|
*/
|
|
655
559
|
export<T extends KeyExportOptions = {}>(options?: T): KeyExportResult<T, NonSharedBuffer>;
|
|
@@ -690,19 +594,18 @@ declare module "node:crypto" {
|
|
|
690
594
|
type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
|
|
691
595
|
type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";
|
|
692
596
|
type CipherChaCha20Poly1305Types = "chacha20-poly1305";
|
|
693
|
-
type BinaryLike = string | NodeJS.ArrayBufferView;
|
|
694
|
-
type
|
|
695
|
-
interface CipherCCMOptions extends
|
|
597
|
+
type BinaryLike = string | ArrayBufferLike | NodeJS.ArrayBufferView;
|
|
598
|
+
type KeyLike = BinaryLike | KeyObject;
|
|
599
|
+
interface CipherCCMOptions extends TransformOptions {
|
|
696
600
|
authTagLength: number;
|
|
697
601
|
}
|
|
698
|
-
interface CipherGCMOptions extends
|
|
602
|
+
interface CipherGCMOptions extends TransformOptions {
|
|
699
603
|
authTagLength?: number | undefined;
|
|
700
604
|
}
|
|
701
|
-
interface CipherOCBOptions extends
|
|
605
|
+
interface CipherOCBOptions extends TransformOptions {
|
|
702
606
|
authTagLength: number;
|
|
703
607
|
}
|
|
704
|
-
interface CipherChaCha20Poly1305Options extends
|
|
705
|
-
/** @default 16 */
|
|
608
|
+
interface CipherChaCha20Poly1305Options extends TransformOptions {
|
|
706
609
|
authTagLength?: number | undefined;
|
|
707
610
|
}
|
|
708
611
|
/**
|
|
@@ -737,33 +640,33 @@ declare module "node:crypto" {
|
|
|
737
640
|
*/
|
|
738
641
|
function createCipheriv(
|
|
739
642
|
algorithm: CipherCCMTypes,
|
|
740
|
-
key:
|
|
643
|
+
key: KeyLike,
|
|
741
644
|
iv: BinaryLike,
|
|
742
645
|
options: CipherCCMOptions,
|
|
743
646
|
): CipherCCM;
|
|
744
647
|
function createCipheriv(
|
|
745
648
|
algorithm: CipherOCBTypes,
|
|
746
|
-
key:
|
|
649
|
+
key: KeyLike,
|
|
747
650
|
iv: BinaryLike,
|
|
748
651
|
options: CipherOCBOptions,
|
|
749
652
|
): CipherOCB;
|
|
750
653
|
function createCipheriv(
|
|
751
654
|
algorithm: CipherGCMTypes,
|
|
752
|
-
key:
|
|
655
|
+
key: KeyLike,
|
|
753
656
|
iv: BinaryLike,
|
|
754
657
|
options?: CipherGCMOptions,
|
|
755
658
|
): CipherGCM;
|
|
756
659
|
function createCipheriv(
|
|
757
660
|
algorithm: CipherChaCha20Poly1305Types,
|
|
758
|
-
key:
|
|
661
|
+
key: KeyLike,
|
|
759
662
|
iv: BinaryLike,
|
|
760
663
|
options?: CipherChaCha20Poly1305Options,
|
|
761
664
|
): CipherChaCha20Poly1305;
|
|
762
665
|
function createCipheriv(
|
|
763
666
|
algorithm: string,
|
|
764
|
-
key:
|
|
667
|
+
key: KeyLike,
|
|
765
668
|
iv: BinaryLike | null,
|
|
766
|
-
options?:
|
|
669
|
+
options?: TransformOptions,
|
|
767
670
|
): Cipheriv;
|
|
768
671
|
/**
|
|
769
672
|
* Instances of the `Cipheriv` class are used to encrypt data. The class can be
|
|
@@ -884,7 +787,7 @@ declare module "node:crypto" {
|
|
|
884
787
|
* ```
|
|
885
788
|
* @since v0.1.94
|
|
886
789
|
*/
|
|
887
|
-
class Cipheriv extends
|
|
790
|
+
class Cipheriv extends Transform {
|
|
888
791
|
private constructor();
|
|
889
792
|
/**
|
|
890
793
|
* Updates the cipher with `data`. If the `inputEncoding` argument is given,
|
|
@@ -900,10 +803,12 @@ declare module "node:crypto" {
|
|
|
900
803
|
* @param inputEncoding The `encoding` of the data.
|
|
901
804
|
* @param outputEncoding The `encoding` of the return value.
|
|
902
805
|
*/
|
|
903
|
-
update(data:
|
|
904
|
-
update(
|
|
905
|
-
|
|
906
|
-
|
|
806
|
+
update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): NonSharedBuffer;
|
|
807
|
+
update(
|
|
808
|
+
data: string | NodeJS.ArrayBufferView,
|
|
809
|
+
inputEncoding: BufferEncoding | null | undefined,
|
|
810
|
+
outputEncoding: BufferEncoding,
|
|
811
|
+
): string;
|
|
907
812
|
/**
|
|
908
813
|
* Once the `cipher.final()` method has been called, the `Cipheriv` object can no
|
|
909
814
|
* longer be used to encrypt data. Attempts to call `cipher.final()` more than
|
|
@@ -931,50 +836,31 @@ declare module "node:crypto" {
|
|
|
931
836
|
*/
|
|
932
837
|
setAutoPadding(autoPadding?: boolean): this;
|
|
933
838
|
}
|
|
934
|
-
interface
|
|
935
|
-
setAAD(
|
|
936
|
-
buffer: NodeJS.ArrayBufferView,
|
|
937
|
-
options: {
|
|
938
|
-
plaintextLength: number;
|
|
939
|
-
},
|
|
940
|
-
): this;
|
|
839
|
+
interface CipherAEADMethods {
|
|
941
840
|
getAuthTag(): NonSharedBuffer;
|
|
841
|
+
setAAD(buffer: BinaryLike, options?: {
|
|
842
|
+
plaintextLength?: number | undefined;
|
|
843
|
+
encoding?: BufferEncoding | undefined;
|
|
844
|
+
}): this;
|
|
942
845
|
}
|
|
943
|
-
interface
|
|
944
|
-
setAAD(
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
},
|
|
949
|
-
): this;
|
|
950
|
-
getAuthTag(): NonSharedBuffer;
|
|
951
|
-
}
|
|
952
|
-
interface CipherOCB extends Cipheriv {
|
|
953
|
-
setAAD(
|
|
954
|
-
buffer: NodeJS.ArrayBufferView,
|
|
955
|
-
options?: {
|
|
956
|
-
plaintextLength: number;
|
|
957
|
-
},
|
|
958
|
-
): this;
|
|
959
|
-
getAuthTag(): NonSharedBuffer;
|
|
960
|
-
}
|
|
961
|
-
interface CipherChaCha20Poly1305 extends Cipheriv {
|
|
962
|
-
setAAD(
|
|
963
|
-
buffer: NodeJS.ArrayBufferView,
|
|
964
|
-
options: {
|
|
965
|
-
plaintextLength: number;
|
|
966
|
-
},
|
|
967
|
-
): this;
|
|
968
|
-
getAuthTag(): NonSharedBuffer;
|
|
846
|
+
interface CipherCCM extends Cipheriv, CipherAEADMethods {
|
|
847
|
+
setAAD(buffer: BinaryLike, options: {
|
|
848
|
+
plaintextLength: number;
|
|
849
|
+
encoding?: BufferEncoding | undefined;
|
|
850
|
+
}): this;
|
|
969
851
|
}
|
|
852
|
+
interface CipherGCM extends Cipheriv, CipherAEADMethods {}
|
|
853
|
+
interface CipherOCB extends Cipheriv, CipherAEADMethods {}
|
|
854
|
+
interface CipherChaCha20Poly1305 extends Cipheriv, CipherAEADMethods {}
|
|
970
855
|
/**
|
|
971
856
|
* Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
|
|
972
857
|
*
|
|
973
858
|
* The `options` argument controls stream behavior and is optional except when a
|
|
974
|
-
* cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the
|
|
975
|
-
*
|
|
976
|
-
*
|
|
977
|
-
* For `chacha20-poly1305`, the `authTagLength` option defaults to 16
|
|
859
|
+
* cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the
|
|
860
|
+
* `authTagLength` option is required and specifies the length of the
|
|
861
|
+
* authentication tag in bytes, see [CCM mode](https://nodejs.org/docs/latest-v26.x/api/crypto.html#ccm-mode).
|
|
862
|
+
* For AES-GCM and `chacha20-poly1305`, the `authTagLength` option defaults to 16
|
|
863
|
+
* bytes and must be set to a different value if a different length is used.
|
|
978
864
|
*
|
|
979
865
|
* The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
|
|
980
866
|
* recent OpenSSL releases, `openssl list -cipher-algorithms` will
|
|
@@ -998,33 +884,33 @@ declare module "node:crypto" {
|
|
|
998
884
|
*/
|
|
999
885
|
function createDecipheriv(
|
|
1000
886
|
algorithm: CipherCCMTypes,
|
|
1001
|
-
key:
|
|
887
|
+
key: KeyLike,
|
|
1002
888
|
iv: BinaryLike,
|
|
1003
889
|
options: CipherCCMOptions,
|
|
1004
890
|
): DecipherCCM;
|
|
1005
891
|
function createDecipheriv(
|
|
1006
892
|
algorithm: CipherOCBTypes,
|
|
1007
|
-
key:
|
|
893
|
+
key: KeyLike,
|
|
1008
894
|
iv: BinaryLike,
|
|
1009
895
|
options: CipherOCBOptions,
|
|
1010
896
|
): DecipherOCB;
|
|
1011
897
|
function createDecipheriv(
|
|
1012
898
|
algorithm: CipherGCMTypes,
|
|
1013
|
-
key:
|
|
899
|
+
key: KeyLike,
|
|
1014
900
|
iv: BinaryLike,
|
|
1015
901
|
options?: CipherGCMOptions,
|
|
1016
902
|
): DecipherGCM;
|
|
1017
903
|
function createDecipheriv(
|
|
1018
904
|
algorithm: CipherChaCha20Poly1305Types,
|
|
1019
|
-
key:
|
|
905
|
+
key: KeyLike,
|
|
1020
906
|
iv: BinaryLike,
|
|
1021
907
|
options?: CipherChaCha20Poly1305Options,
|
|
1022
908
|
): DecipherChaCha20Poly1305;
|
|
1023
909
|
function createDecipheriv(
|
|
1024
910
|
algorithm: string,
|
|
1025
|
-
key:
|
|
911
|
+
key: KeyLike,
|
|
1026
912
|
iv: BinaryLike | null,
|
|
1027
|
-
options?:
|
|
913
|
+
options?: TransformOptions,
|
|
1028
914
|
): Decipheriv;
|
|
1029
915
|
/**
|
|
1030
916
|
* Instances of the `Decipheriv` class are used to decrypt data. The class can be
|
|
@@ -1134,7 +1020,7 @@ declare module "node:crypto" {
|
|
|
1134
1020
|
* ```
|
|
1135
1021
|
* @since v0.1.94
|
|
1136
1022
|
*/
|
|
1137
|
-
class Decipheriv extends
|
|
1023
|
+
class Decipheriv extends Transform {
|
|
1138
1024
|
private constructor();
|
|
1139
1025
|
/**
|
|
1140
1026
|
* Updates the decipher with `data`. If the `inputEncoding` argument is given,
|
|
@@ -1150,10 +1036,12 @@ declare module "node:crypto" {
|
|
|
1150
1036
|
* @param inputEncoding The `encoding` of the `data` string.
|
|
1151
1037
|
* @param outputEncoding The `encoding` of the return value.
|
|
1152
1038
|
*/
|
|
1153
|
-
update(data: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
1154
|
-
update(
|
|
1155
|
-
|
|
1156
|
-
|
|
1039
|
+
update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): NonSharedBuffer;
|
|
1040
|
+
update(
|
|
1041
|
+
data: string | NodeJS.ArrayBufferView,
|
|
1042
|
+
inputEncoding: BufferEncoding | null | undefined,
|
|
1043
|
+
outputEncoding: BufferEncoding,
|
|
1044
|
+
): string;
|
|
1157
1045
|
/**
|
|
1158
1046
|
* Once the `decipher.final()` method has been called, the `Decipheriv` object can
|
|
1159
1047
|
* no longer be used to decrypt data. Attempts to call `decipher.final()` more
|
|
@@ -1178,54 +1066,59 @@ declare module "node:crypto" {
|
|
|
1178
1066
|
*/
|
|
1179
1067
|
setAutoPadding(auto_padding?: boolean): this;
|
|
1180
1068
|
}
|
|
1181
|
-
interface
|
|
1182
|
-
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1183
|
-
setAAD(
|
|
1184
|
-
buffer: NodeJS.ArrayBufferView,
|
|
1185
|
-
options: {
|
|
1186
|
-
plaintextLength: number;
|
|
1187
|
-
},
|
|
1188
|
-
): this;
|
|
1189
|
-
}
|
|
1190
|
-
interface DecipherGCM extends Decipheriv {
|
|
1191
|
-
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1192
|
-
setAAD(
|
|
1193
|
-
buffer: NodeJS.ArrayBufferView,
|
|
1194
|
-
options?: {
|
|
1195
|
-
plaintextLength: number;
|
|
1196
|
-
},
|
|
1197
|
-
): this;
|
|
1198
|
-
}
|
|
1199
|
-
interface DecipherOCB extends Decipheriv {
|
|
1200
|
-
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1069
|
+
interface DecipherAEADMethods {
|
|
1201
1070
|
setAAD(
|
|
1202
|
-
buffer:
|
|
1071
|
+
buffer: BinaryLike,
|
|
1203
1072
|
options?: {
|
|
1204
|
-
plaintextLength
|
|
1073
|
+
plaintextLength?: number | undefined;
|
|
1074
|
+
encoding?: BufferEncoding | undefined;
|
|
1205
1075
|
},
|
|
1206
1076
|
): this;
|
|
1077
|
+
setAuthTag(buffer: BinaryLike, encoding?: BufferEncoding): this;
|
|
1207
1078
|
}
|
|
1208
|
-
interface
|
|
1209
|
-
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1079
|
+
interface DecipherCCM extends Decipheriv, DecipherAEADMethods {
|
|
1210
1080
|
setAAD(
|
|
1211
|
-
buffer:
|
|
1081
|
+
buffer: BinaryLike,
|
|
1212
1082
|
options: {
|
|
1213
1083
|
plaintextLength: number;
|
|
1084
|
+
encoding?: BufferEncoding | undefined;
|
|
1214
1085
|
},
|
|
1215
1086
|
): this;
|
|
1216
1087
|
}
|
|
1088
|
+
interface DecipherGCM extends Decipheriv, DecipherAEADMethods {}
|
|
1089
|
+
interface DecipherOCB extends Decipheriv, DecipherAEADMethods {}
|
|
1090
|
+
interface DecipherChaCha20Poly1305 extends Decipheriv, DecipherAEADMethods {}
|
|
1217
1091
|
interface PrivateKeyInput {
|
|
1218
|
-
key:
|
|
1219
|
-
format?:
|
|
1092
|
+
key: BinaryLike;
|
|
1093
|
+
format?: "pem" | "der" | undefined;
|
|
1220
1094
|
type?: PrivateKeyExportType | undefined;
|
|
1221
|
-
passphrase?:
|
|
1222
|
-
encoding?:
|
|
1095
|
+
passphrase?: BinaryLike | undefined;
|
|
1096
|
+
encoding?: BufferEncoding | undefined;
|
|
1223
1097
|
}
|
|
1224
1098
|
interface PublicKeyInput {
|
|
1225
|
-
key:
|
|
1226
|
-
format?:
|
|
1099
|
+
key: BinaryLike;
|
|
1100
|
+
format?: "pem" | "der" | undefined;
|
|
1227
1101
|
type?: PublicKeyExportType | undefined;
|
|
1228
|
-
encoding?:
|
|
1102
|
+
encoding?: BufferEncoding | undefined;
|
|
1103
|
+
}
|
|
1104
|
+
interface RawPrivateKeyInput {
|
|
1105
|
+
key: ArrayBufferLike | NodeJS.ArrayBufferView;
|
|
1106
|
+
format: "raw-private" | "raw-seed";
|
|
1107
|
+
asymmetricKeyType: AsymmetricKeyType;
|
|
1108
|
+
namedCurve?: string | undefined;
|
|
1109
|
+
}
|
|
1110
|
+
interface RawPublicKeyInput {
|
|
1111
|
+
key: ArrayBufferLike | NodeJS.ArrayBufferView;
|
|
1112
|
+
format: "raw-public";
|
|
1113
|
+
asymmetricKeyType: AsymmetricKeyType;
|
|
1114
|
+
namedCurve?: string | undefined;
|
|
1115
|
+
}
|
|
1116
|
+
interface JsonWebKeyInput {
|
|
1117
|
+
key: webcrypto.JsonWebKey;
|
|
1118
|
+
format: "jwk";
|
|
1119
|
+
}
|
|
1120
|
+
interface SecretKeyOptions {
|
|
1121
|
+
length: number;
|
|
1229
1122
|
}
|
|
1230
1123
|
/**
|
|
1231
1124
|
* Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
|
|
@@ -1248,9 +1141,7 @@ declare module "node:crypto" {
|
|
|
1248
1141
|
*/
|
|
1249
1142
|
function generateKey(
|
|
1250
1143
|
type: "hmac" | "aes",
|
|
1251
|
-
options:
|
|
1252
|
-
length: number;
|
|
1253
|
-
},
|
|
1144
|
+
options: SecretKeyOptions,
|
|
1254
1145
|
callback: (err: Error | null, key: KeyObject) => void,
|
|
1255
1146
|
): void;
|
|
1256
1147
|
/**
|
|
@@ -1270,16 +1161,7 @@ declare module "node:crypto" {
|
|
|
1270
1161
|
* @since v15.0.0
|
|
1271
1162
|
* @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
|
|
1272
1163
|
*/
|
|
1273
|
-
function generateKeySync(
|
|
1274
|
-
type: "hmac" | "aes",
|
|
1275
|
-
options: {
|
|
1276
|
-
length: number;
|
|
1277
|
-
},
|
|
1278
|
-
): KeyObject;
|
|
1279
|
-
interface JsonWebKeyInput {
|
|
1280
|
-
key: webcrypto.JsonWebKey;
|
|
1281
|
-
format: "jwk";
|
|
1282
|
-
}
|
|
1164
|
+
function generateKeySync(type: "hmac" | "aes", options: SecretKeyOptions): KeyObject;
|
|
1283
1165
|
/**
|
|
1284
1166
|
* Creates and returns a new key object containing a private key. If `key` is a
|
|
1285
1167
|
* string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above.
|
|
@@ -1288,7 +1170,7 @@ declare module "node:crypto" {
|
|
|
1288
1170
|
* of the passphrase is limited to 1024 bytes.
|
|
1289
1171
|
* @since v11.6.0
|
|
1290
1172
|
*/
|
|
1291
|
-
function createPrivateKey(key: PrivateKeyInput |
|
|
1173
|
+
function createPrivateKey(key: PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput | BinaryLike): KeyObject;
|
|
1292
1174
|
/**
|
|
1293
1175
|
* Creates and returns a new key object containing a public key. If `key` is a
|
|
1294
1176
|
* string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key;
|
|
@@ -1303,15 +1185,14 @@ declare module "node:crypto" {
|
|
|
1303
1185
|
* and it will be impossible to extract the private key from the returned object.
|
|
1304
1186
|
* @since v11.6.0
|
|
1305
1187
|
*/
|
|
1306
|
-
function createPublicKey(key: PublicKeyInput |
|
|
1188
|
+
function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput | BinaryLike): KeyObject;
|
|
1307
1189
|
/**
|
|
1308
1190
|
* Creates and returns a new key object containing a secret key for symmetric
|
|
1309
1191
|
* encryption or `Hmac`.
|
|
1310
1192
|
* @since v11.6.0
|
|
1311
1193
|
* @param encoding The string encoding when `key` is a string.
|
|
1312
1194
|
*/
|
|
1313
|
-
function createSecretKey(key:
|
|
1314
|
-
function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
|
|
1195
|
+
function createSecretKey(key: BinaryLike, encoding?: BufferEncoding): KeyObject;
|
|
1315
1196
|
/**
|
|
1316
1197
|
* Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
|
|
1317
1198
|
* Optional `options` argument controls the `stream.Writable` behavior.
|
|
@@ -1324,29 +1205,26 @@ declare module "node:crypto" {
|
|
|
1324
1205
|
* @since v0.1.92
|
|
1325
1206
|
* @param options `stream.Writable` options
|
|
1326
1207
|
*/
|
|
1327
|
-
|
|
1328
|
-
function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
|
|
1208
|
+
function createSign(algorithm: string, options?: WritableOptions): Sign;
|
|
1329
1209
|
type DSAEncoding = "der" | "ieee-p1363";
|
|
1330
1210
|
interface SigningOptions {
|
|
1331
|
-
/**
|
|
1332
|
-
* @see crypto.constants.RSA_PKCS1_PADDING
|
|
1333
|
-
*/
|
|
1334
1211
|
padding?: number | undefined;
|
|
1335
1212
|
saltLength?: number | undefined;
|
|
1336
1213
|
dsaEncoding?: DSAEncoding | undefined;
|
|
1337
|
-
context?:
|
|
1214
|
+
context?: NodeJS.ArrayBufferView | undefined;
|
|
1338
1215
|
}
|
|
1339
1216
|
interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
|
|
1217
|
+
interface SignRawPrivateKeyInput extends RawPrivateKeyInput, SigningOptions {}
|
|
1218
|
+
interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
|
|
1340
1219
|
interface SignKeyObjectInput extends SigningOptions {
|
|
1341
1220
|
key: KeyObject;
|
|
1342
1221
|
}
|
|
1343
|
-
interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
|
|
1344
1222
|
interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
|
|
1223
|
+
interface VerifyRawPublicKeyInput extends RawPublicKeyInput, SigningOptions {}
|
|
1224
|
+
interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
|
|
1345
1225
|
interface VerifyKeyObjectInput extends SigningOptions {
|
|
1346
1226
|
key: KeyObject;
|
|
1347
1227
|
}
|
|
1348
|
-
interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
|
|
1349
|
-
type KeyLike = string | Buffer | KeyObject;
|
|
1350
1228
|
/**
|
|
1351
1229
|
* The `Sign` class is a utility for generating signatures. It can be used in one
|
|
1352
1230
|
* of two ways:
|
|
@@ -1410,7 +1288,7 @@ declare module "node:crypto" {
|
|
|
1410
1288
|
* ```
|
|
1411
1289
|
* @since v0.1.92
|
|
1412
1290
|
*/
|
|
1413
|
-
class Sign extends
|
|
1291
|
+
class Sign extends Writable {
|
|
1414
1292
|
private constructor();
|
|
1415
1293
|
/**
|
|
1416
1294
|
* Updates the `Sign` content with the given `data`, the encoding of which
|
|
@@ -1422,8 +1300,7 @@ declare module "node:crypto" {
|
|
|
1422
1300
|
* @since v0.1.92
|
|
1423
1301
|
* @param inputEncoding The `encoding` of the `data` string.
|
|
1424
1302
|
*/
|
|
1425
|
-
update(data:
|
|
1426
|
-
update(data: string, inputEncoding: Encoding): this;
|
|
1303
|
+
update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): this;
|
|
1427
1304
|
/**
|
|
1428
1305
|
* Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
|
|
1429
1306
|
*
|
|
@@ -1436,10 +1313,22 @@ declare module "node:crypto" {
|
|
|
1436
1313
|
* called. Multiple calls to `sign.sign()` will result in an error being thrown.
|
|
1437
1314
|
* @since v0.1.92
|
|
1438
1315
|
*/
|
|
1439
|
-
sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer;
|
|
1440
1316
|
sign(
|
|
1441
|
-
privateKey:
|
|
1442
|
-
|
|
1317
|
+
privateKey:
|
|
1318
|
+
| KeyLike
|
|
1319
|
+
| SignKeyObjectInput
|
|
1320
|
+
| SignPrivateKeyInput
|
|
1321
|
+
| SignRawPrivateKeyInput
|
|
1322
|
+
| SignJsonWebKeyInput,
|
|
1323
|
+
): NonSharedBuffer;
|
|
1324
|
+
sign(
|
|
1325
|
+
privateKey:
|
|
1326
|
+
| KeyLike
|
|
1327
|
+
| SignKeyObjectInput
|
|
1328
|
+
| SignPrivateKeyInput
|
|
1329
|
+
| SignRawPrivateKeyInput
|
|
1330
|
+
| SignJsonWebKeyInput,
|
|
1331
|
+
outputFormat: BufferEncoding,
|
|
1443
1332
|
): string;
|
|
1444
1333
|
}
|
|
1445
1334
|
/**
|
|
@@ -1455,7 +1344,7 @@ declare module "node:crypto" {
|
|
|
1455
1344
|
* @since v0.1.92
|
|
1456
1345
|
* @param options `stream.Writable` options
|
|
1457
1346
|
*/
|
|
1458
|
-
function createVerify(algorithm: string, options?:
|
|
1347
|
+
function createVerify(algorithm: string, options?: WritableOptions): Verify;
|
|
1459
1348
|
/**
|
|
1460
1349
|
* The `Verify` class is a utility for verifying signatures. It can be used in one
|
|
1461
1350
|
* of two ways:
|
|
@@ -1470,7 +1359,7 @@ declare module "node:crypto" {
|
|
|
1470
1359
|
* See `Sign` for examples.
|
|
1471
1360
|
* @since v0.1.92
|
|
1472
1361
|
*/
|
|
1473
|
-
class Verify extends
|
|
1362
|
+
class Verify extends Writable {
|
|
1474
1363
|
private constructor();
|
|
1475
1364
|
/**
|
|
1476
1365
|
* Updates the `Verify` content with the given `data`, the encoding of which
|
|
@@ -1482,12 +1371,11 @@ declare module "node:crypto" {
|
|
|
1482
1371
|
* @since v0.1.92
|
|
1483
1372
|
* @param inputEncoding The `encoding` of the `data` string.
|
|
1484
1373
|
*/
|
|
1485
|
-
update(data:
|
|
1486
|
-
update(data: string, inputEncoding: Encoding): Verify;
|
|
1374
|
+
update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Verify;
|
|
1487
1375
|
/**
|
|
1488
|
-
* Verifies the provided data using the given `
|
|
1376
|
+
* Verifies the provided data using the given `key` and `signature`.
|
|
1489
1377
|
*
|
|
1490
|
-
* If `
|
|
1378
|
+
* If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
|
|
1491
1379
|
* object, the following additional properties can be passed:
|
|
1492
1380
|
*
|
|
1493
1381
|
* The `signature` argument is the previously calculated signature for the data, in
|
|
@@ -1504,13 +1392,14 @@ declare module "node:crypto" {
|
|
|
1504
1392
|
* @since v0.1.92
|
|
1505
1393
|
*/
|
|
1506
1394
|
verify(
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1395
|
+
key:
|
|
1396
|
+
| KeyLike
|
|
1397
|
+
| VerifyKeyObjectInput
|
|
1398
|
+
| VerifyPublicKeyInput
|
|
1399
|
+
| VerifyRawPublicKeyInput
|
|
1400
|
+
| VerifyJsonWebKeyInput,
|
|
1401
|
+
signature: BinaryLike,
|
|
1402
|
+
signatureEncoding?: BufferEncoding,
|
|
1514
1403
|
): boolean;
|
|
1515
1404
|
}
|
|
1516
1405
|
/**
|
|
@@ -1531,24 +1420,15 @@ declare module "node:crypto" {
|
|
|
1531
1420
|
*/
|
|
1532
1421
|
function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
|
|
1533
1422
|
function createDiffieHellman(
|
|
1534
|
-
prime:
|
|
1535
|
-
|
|
1423
|
+
prime: BinaryLike,
|
|
1424
|
+
primeEncoding?: BufferEncoding,
|
|
1425
|
+
generator?: number | BinaryLike,
|
|
1426
|
+
generatorEncoding?: BufferEncoding,
|
|
1536
1427
|
): DiffieHellman;
|
|
1537
1428
|
function createDiffieHellman(
|
|
1538
|
-
prime:
|
|
1539
|
-
generator:
|
|
1540
|
-
generatorEncoding
|
|
1541
|
-
): DiffieHellman;
|
|
1542
|
-
function createDiffieHellman(
|
|
1543
|
-
prime: string,
|
|
1544
|
-
primeEncoding: BinaryToTextEncoding,
|
|
1545
|
-
generator?: number | ArrayBuffer | NodeJS.ArrayBufferView,
|
|
1546
|
-
): DiffieHellman;
|
|
1547
|
-
function createDiffieHellman(
|
|
1548
|
-
prime: string,
|
|
1549
|
-
primeEncoding: BinaryToTextEncoding,
|
|
1550
|
-
generator: string,
|
|
1551
|
-
generatorEncoding: BinaryToTextEncoding,
|
|
1429
|
+
prime: BinaryLike,
|
|
1430
|
+
generator: number | BinaryLike,
|
|
1431
|
+
generatorEncoding?: BufferEncoding,
|
|
1552
1432
|
): DiffieHellman;
|
|
1553
1433
|
/**
|
|
1554
1434
|
* The `DiffieHellman` class is a utility for creating Diffie-Hellman key
|
|
@@ -1590,13 +1470,15 @@ declare module "node:crypto" {
|
|
|
1590
1470
|
* If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
|
|
1591
1471
|
*
|
|
1592
1472
|
* This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular,
|
|
1593
|
-
* once a private key has been generated or set, calling this function only
|
|
1594
|
-
* the public key
|
|
1473
|
+
* once a private key has been generated or set, calling this function only
|
|
1474
|
+
* recomputes the public key from the existing private key. Since the public key is
|
|
1475
|
+
* determined by the private key, the result will be the same unless the private key
|
|
1476
|
+
* has been changed via `diffieHellman.setPrivateKey()`.
|
|
1595
1477
|
* @since v0.5.0
|
|
1596
1478
|
* @param encoding The `encoding` of the return value.
|
|
1597
1479
|
*/
|
|
1598
1480
|
generateKeys(): NonSharedBuffer;
|
|
1599
|
-
generateKeys(encoding:
|
|
1481
|
+
generateKeys(encoding: BufferEncoding): string;
|
|
1600
1482
|
/**
|
|
1601
1483
|
* Computes the shared secret using `otherPublicKey` as the other
|
|
1602
1484
|
* party's public key and returns the computed shared secret. The supplied
|
|
@@ -1611,24 +1493,13 @@ declare module "node:crypto" {
|
|
|
1611
1493
|
* @param outputEncoding The `encoding` of the return value.
|
|
1612
1494
|
*/
|
|
1613
1495
|
computeSecret(
|
|
1614
|
-
otherPublicKey:
|
|
1615
|
-
inputEncoding?:
|
|
1616
|
-
outputEncoding?: null,
|
|
1496
|
+
otherPublicKey: BinaryLike,
|
|
1497
|
+
inputEncoding?: BufferEncoding,
|
|
1617
1498
|
): NonSharedBuffer;
|
|
1618
1499
|
computeSecret(
|
|
1619
|
-
otherPublicKey:
|
|
1620
|
-
inputEncoding:
|
|
1621
|
-
outputEncoding
|
|
1622
|
-
): NonSharedBuffer;
|
|
1623
|
-
computeSecret(
|
|
1624
|
-
otherPublicKey: NodeJS.ArrayBufferView,
|
|
1625
|
-
inputEncoding: null,
|
|
1626
|
-
outputEncoding: BinaryToTextEncoding,
|
|
1627
|
-
): string;
|
|
1628
|
-
computeSecret(
|
|
1629
|
-
otherPublicKey: string,
|
|
1630
|
-
inputEncoding: BinaryToTextEncoding,
|
|
1631
|
-
outputEncoding: BinaryToTextEncoding,
|
|
1500
|
+
otherPublicKey: BinaryLike,
|
|
1501
|
+
inputEncoding: BufferEncoding | null | undefined,
|
|
1502
|
+
outputEncoding: BufferEncoding,
|
|
1632
1503
|
): string;
|
|
1633
1504
|
/**
|
|
1634
1505
|
* Returns the Diffie-Hellman prime in the specified `encoding`.
|
|
@@ -1638,7 +1509,7 @@ declare module "node:crypto" {
|
|
|
1638
1509
|
* @param encoding The `encoding` of the return value.
|
|
1639
1510
|
*/
|
|
1640
1511
|
getPrime(): NonSharedBuffer;
|
|
1641
|
-
getPrime(encoding:
|
|
1512
|
+
getPrime(encoding: BufferEncoding): string;
|
|
1642
1513
|
/**
|
|
1643
1514
|
* Returns the Diffie-Hellman generator in the specified `encoding`.
|
|
1644
1515
|
* If `encoding` is provided a string is
|
|
@@ -1647,7 +1518,7 @@ declare module "node:crypto" {
|
|
|
1647
1518
|
* @param encoding The `encoding` of the return value.
|
|
1648
1519
|
*/
|
|
1649
1520
|
getGenerator(): NonSharedBuffer;
|
|
1650
|
-
getGenerator(encoding:
|
|
1521
|
+
getGenerator(encoding: BufferEncoding): string;
|
|
1651
1522
|
/**
|
|
1652
1523
|
* Returns the Diffie-Hellman public key in the specified `encoding`.
|
|
1653
1524
|
* If `encoding` is provided a
|
|
@@ -1656,7 +1527,7 @@ declare module "node:crypto" {
|
|
|
1656
1527
|
* @param encoding The `encoding` of the return value.
|
|
1657
1528
|
*/
|
|
1658
1529
|
getPublicKey(): NonSharedBuffer;
|
|
1659
|
-
getPublicKey(encoding:
|
|
1530
|
+
getPublicKey(encoding: BufferEncoding): string;
|
|
1660
1531
|
/**
|
|
1661
1532
|
* Returns the Diffie-Hellman private key in the specified `encoding`.
|
|
1662
1533
|
* If `encoding` is provided a
|
|
@@ -1665,7 +1536,7 @@ declare module "node:crypto" {
|
|
|
1665
1536
|
* @param encoding The `encoding` of the return value.
|
|
1666
1537
|
*/
|
|
1667
1538
|
getPrivateKey(): NonSharedBuffer;
|
|
1668
|
-
getPrivateKey(encoding:
|
|
1539
|
+
getPrivateKey(encoding: BufferEncoding): string;
|
|
1669
1540
|
/**
|
|
1670
1541
|
* Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected
|
|
1671
1542
|
* to be a string. If no `encoding` is provided, `publicKey` is expected
|
|
@@ -1673,8 +1544,7 @@ declare module "node:crypto" {
|
|
|
1673
1544
|
* @since v0.5.0
|
|
1674
1545
|
* @param encoding The `encoding` of the `publicKey` string.
|
|
1675
1546
|
*/
|
|
1676
|
-
setPublicKey(publicKey:
|
|
1677
|
-
setPublicKey(publicKey: string, encoding: BufferEncoding): void;
|
|
1547
|
+
setPublicKey(publicKey: BinaryLike, encoding?: BufferEncoding): void;
|
|
1678
1548
|
/**
|
|
1679
1549
|
* Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
|
|
1680
1550
|
* to be a string. If no `encoding` is provided, `privateKey` is expected
|
|
@@ -1685,8 +1555,7 @@ declare module "node:crypto" {
|
|
|
1685
1555
|
* @since v0.5.0
|
|
1686
1556
|
* @param encoding The `encoding` of the `privateKey` string.
|
|
1687
1557
|
*/
|
|
1688
|
-
setPrivateKey(privateKey:
|
|
1689
|
-
setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
|
|
1558
|
+
setPrivateKey(privateKey: BinaryLike, encoding?: BufferEncoding): void;
|
|
1690
1559
|
/**
|
|
1691
1560
|
* A bit field containing any warnings and/or errors resulting from a check
|
|
1692
1561
|
* performed during initialization of the `DiffieHellman` object.
|
|
@@ -1724,13 +1593,10 @@ declare module "node:crypto" {
|
|
|
1724
1593
|
* ```
|
|
1725
1594
|
* @since v0.7.5
|
|
1726
1595
|
*/
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
new(name: string): DiffieHellmanGroup;
|
|
1730
|
-
(name: string): DiffieHellmanGroup;
|
|
1731
|
-
readonly prototype: DiffieHellmanGroup;
|
|
1596
|
+
class DiffieHellmanGroup {
|
|
1597
|
+
private constructor();
|
|
1732
1598
|
}
|
|
1733
|
-
|
|
1599
|
+
interface DiffieHellmanGroup extends Omit<DiffieHellman, "setPublicKey" | "setPrivateKey"> {}
|
|
1734
1600
|
/**
|
|
1735
1601
|
* Creates a predefined `DiffieHellmanGroup` key exchange object. The
|
|
1736
1602
|
* supported groups are listed in the documentation for `DiffieHellmanGroup`.
|
|
@@ -1944,9 +1810,8 @@ declare module "node:crypto" {
|
|
|
1944
1810
|
* console.log(`The dice rolled: ${n}`);
|
|
1945
1811
|
* ```
|
|
1946
1812
|
* @since v14.10.0, v12.19.0
|
|
1947
|
-
* @param
|
|
1813
|
+
* @param min Start of random range (inclusive).
|
|
1948
1814
|
* @param max End of random range (exclusive).
|
|
1949
|
-
* @param callback `function(err, n) {}`.
|
|
1950
1815
|
*/
|
|
1951
1816
|
function randomInt(max: number): number;
|
|
1952
1817
|
function randomInt(min: number, max: number): number;
|
|
@@ -1993,7 +1858,11 @@ declare module "node:crypto" {
|
|
|
1993
1858
|
* @param [size=buffer.length - offset]
|
|
1994
1859
|
* @return The object passed as `buffer` argument.
|
|
1995
1860
|
*/
|
|
1996
|
-
function randomFillSync<T extends NodeJS.ArrayBufferView>(
|
|
1861
|
+
function randomFillSync<T extends ArrayBufferLike | NodeJS.ArrayBufferView>(
|
|
1862
|
+
buffer: T,
|
|
1863
|
+
offset?: number,
|
|
1864
|
+
size?: number,
|
|
1865
|
+
): T;
|
|
1997
1866
|
/**
|
|
1998
1867
|
* This function is similar to {@link randomBytes} but requires the first
|
|
1999
1868
|
* argument to be a `Buffer` that will be filled. It also
|
|
@@ -2069,16 +1938,16 @@ declare module "node:crypto" {
|
|
|
2069
1938
|
* @param [size=buffer.length - offset]
|
|
2070
1939
|
* @param callback `function(err, buf) {}`.
|
|
2071
1940
|
*/
|
|
2072
|
-
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
1941
|
+
function randomFill<T extends ArrayBufferLike | NodeJS.ArrayBufferView>(
|
|
2073
1942
|
buffer: T,
|
|
2074
1943
|
callback: (err: Error | null, buf: T) => void,
|
|
2075
1944
|
): void;
|
|
2076
|
-
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
1945
|
+
function randomFill<T extends ArrayBufferLike | NodeJS.ArrayBufferView>(
|
|
2077
1946
|
buffer: T,
|
|
2078
1947
|
offset: number,
|
|
2079
1948
|
callback: (err: Error | null, buf: T) => void,
|
|
2080
1949
|
): void;
|
|
2081
|
-
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
1950
|
+
function randomFill<T extends ArrayBufferLike | NodeJS.ArrayBufferView>(
|
|
2082
1951
|
buffer: T,
|
|
2083
1952
|
offset: number,
|
|
2084
1953
|
size: number,
|
|
@@ -2176,19 +2045,25 @@ declare module "node:crypto" {
|
|
|
2176
2045
|
keylen: number,
|
|
2177
2046
|
options?: ScryptOptions,
|
|
2178
2047
|
): NonSharedBuffer;
|
|
2179
|
-
interface
|
|
2180
|
-
key: KeyLike;
|
|
2048
|
+
interface PublicDecryptOptions {
|
|
2181
2049
|
padding?: number | undefined;
|
|
2050
|
+
encoding?: BufferEncoding | undefined;
|
|
2182
2051
|
}
|
|
2183
|
-
interface
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2052
|
+
interface PublicDecryptPrivateKeyInput extends PrivateKeyInput, PublicDecryptOptions {}
|
|
2053
|
+
interface PublicDecryptPublicKeyInput extends PublicKeyInput, PublicDecryptOptions {}
|
|
2054
|
+
interface PublicDecryptJsonWebKeyInput extends JsonWebKeyInput, PublicDecryptOptions {}
|
|
2055
|
+
interface PublicDecryptKeyObjectInput extends PublicDecryptOptions {
|
|
2056
|
+
key: KeyObject;
|
|
2057
|
+
}
|
|
2058
|
+
interface PublicEncryptOptions extends PublicDecryptOptions {
|
|
2189
2059
|
oaepHash?: string | undefined;
|
|
2190
|
-
oaepLabel?:
|
|
2191
|
-
|
|
2060
|
+
oaepLabel?: BinaryLike | undefined;
|
|
2061
|
+
}
|
|
2062
|
+
interface PublicEncryptPrivateKeyInput extends PrivateKeyInput, PublicEncryptOptions {}
|
|
2063
|
+
interface PublicEncryptPublicKeyInput extends PublicKeyInput, PublicEncryptOptions {}
|
|
2064
|
+
interface PublicEncryptJsonWebKeyInput extends JsonWebKeyInput, PublicEncryptOptions {}
|
|
2065
|
+
interface PublicEncryptKeyObjectInput extends PublicEncryptOptions {
|
|
2066
|
+
key: KeyObject;
|
|
2192
2067
|
}
|
|
2193
2068
|
/**
|
|
2194
2069
|
* Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
|
|
@@ -2202,8 +2077,13 @@ declare module "node:crypto" {
|
|
|
2202
2077
|
* @since v0.11.14
|
|
2203
2078
|
*/
|
|
2204
2079
|
function publicEncrypt(
|
|
2205
|
-
key:
|
|
2206
|
-
|
|
2080
|
+
key:
|
|
2081
|
+
| KeyLike
|
|
2082
|
+
| PublicEncryptKeyObjectInput
|
|
2083
|
+
| PublicEncryptPrivateKeyInput
|
|
2084
|
+
| PublicEncryptPublicKeyInput
|
|
2085
|
+
| PublicEncryptJsonWebKeyInput,
|
|
2086
|
+
buffer: BinaryLike,
|
|
2207
2087
|
): NonSharedBuffer;
|
|
2208
2088
|
/**
|
|
2209
2089
|
* Decrypts `buffer` with `key`.`buffer` was previously encrypted using
|
|
@@ -2217,8 +2097,13 @@ declare module "node:crypto" {
|
|
|
2217
2097
|
* @since v1.1.0
|
|
2218
2098
|
*/
|
|
2219
2099
|
function publicDecrypt(
|
|
2220
|
-
key:
|
|
2221
|
-
|
|
2100
|
+
key:
|
|
2101
|
+
| KeyLike
|
|
2102
|
+
| PublicDecryptKeyObjectInput
|
|
2103
|
+
| PublicDecryptPrivateKeyInput
|
|
2104
|
+
| PublicDecryptPublicKeyInput
|
|
2105
|
+
| PublicDecryptJsonWebKeyInput,
|
|
2106
|
+
buffer: BinaryLike,
|
|
2222
2107
|
): NonSharedBuffer;
|
|
2223
2108
|
/**
|
|
2224
2109
|
* Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
|
|
@@ -2229,8 +2114,12 @@ declare module "node:crypto" {
|
|
|
2229
2114
|
* @since v0.11.14
|
|
2230
2115
|
*/
|
|
2231
2116
|
function privateDecrypt(
|
|
2232
|
-
privateKey:
|
|
2233
|
-
|
|
2117
|
+
privateKey:
|
|
2118
|
+
| KeyLike
|
|
2119
|
+
| PublicEncryptKeyObjectInput
|
|
2120
|
+
| PublicEncryptPrivateKeyInput
|
|
2121
|
+
| PublicEncryptJsonWebKeyInput,
|
|
2122
|
+
buffer: BinaryLike,
|
|
2234
2123
|
): NonSharedBuffer;
|
|
2235
2124
|
/**
|
|
2236
2125
|
* Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
|
|
@@ -2241,8 +2130,12 @@ declare module "node:crypto" {
|
|
|
2241
2130
|
* @since v1.1.0
|
|
2242
2131
|
*/
|
|
2243
2132
|
function privateEncrypt(
|
|
2244
|
-
privateKey:
|
|
2245
|
-
|
|
2133
|
+
privateKey:
|
|
2134
|
+
| KeyLike
|
|
2135
|
+
| PublicDecryptKeyObjectInput
|
|
2136
|
+
| PublicDecryptPrivateKeyInput
|
|
2137
|
+
| PublicDecryptJsonWebKeyInput,
|
|
2138
|
+
buffer: BinaryLike,
|
|
2246
2139
|
): NonSharedBuffer;
|
|
2247
2140
|
/**
|
|
2248
2141
|
* ```js
|
|
@@ -2292,6 +2185,7 @@ declare module "node:crypto" {
|
|
|
2292
2185
|
* @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
|
|
2293
2186
|
*/
|
|
2294
2187
|
function getHashes(): string[];
|
|
2188
|
+
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
|
|
2295
2189
|
/**
|
|
2296
2190
|
* The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
|
|
2297
2191
|
* key exchanges.
|
|
@@ -2364,15 +2258,21 @@ declare module "node:crypto" {
|
|
|
2364
2258
|
* @since v10.0.0
|
|
2365
2259
|
* @param inputEncoding The `encoding` of the `key` string.
|
|
2366
2260
|
* @param outputEncoding The `encoding` of the return value.
|
|
2367
|
-
* @param [format='uncompressed']
|
|
2368
2261
|
*/
|
|
2369
2262
|
static convertKey(
|
|
2370
2263
|
key: BinaryLike,
|
|
2371
2264
|
curve: string,
|
|
2372
|
-
inputEncoding?:
|
|
2373
|
-
outputEncoding?:
|
|
2265
|
+
inputEncoding?: BufferEncoding,
|
|
2266
|
+
outputEncoding?: null,
|
|
2267
|
+
format?: "uncompressed" | "compressed" | "hybrid",
|
|
2268
|
+
): NonSharedBuffer;
|
|
2269
|
+
static convertKey(
|
|
2270
|
+
key: BinaryLike,
|
|
2271
|
+
curve: string,
|
|
2272
|
+
inputEncoding: BufferEncoding | null | undefined,
|
|
2273
|
+
outputEncoding: BufferEncoding,
|
|
2374
2274
|
format?: "uncompressed" | "compressed" | "hybrid",
|
|
2375
|
-
):
|
|
2275
|
+
): string;
|
|
2376
2276
|
/**
|
|
2377
2277
|
* Generates private and public EC Diffie-Hellman key values, and returns
|
|
2378
2278
|
* the public key in the specified `format` and `encoding`. This key should be
|
|
@@ -2385,8 +2285,8 @@ declare module "node:crypto" {
|
|
|
2385
2285
|
* @param encoding The `encoding` of the return value.
|
|
2386
2286
|
* @param [format='uncompressed']
|
|
2387
2287
|
*/
|
|
2388
|
-
generateKeys(): NonSharedBuffer;
|
|
2389
|
-
generateKeys(encoding:
|
|
2288
|
+
generateKeys(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer;
|
|
2289
|
+
generateKeys(encoding: BufferEncoding, format?: ECDHKeyFormat): string;
|
|
2390
2290
|
/**
|
|
2391
2291
|
* Computes the shared secret using `otherPublicKey` as the other
|
|
2392
2292
|
* party's public key and returns the computed shared secret. The supplied
|
|
@@ -2404,13 +2304,11 @@ declare module "node:crypto" {
|
|
|
2404
2304
|
* @param inputEncoding The `encoding` of the `otherPublicKey` string.
|
|
2405
2305
|
* @param outputEncoding The `encoding` of the return value.
|
|
2406
2306
|
*/
|
|
2407
|
-
computeSecret(otherPublicKey:
|
|
2408
|
-
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer;
|
|
2409
|
-
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
|
|
2307
|
+
computeSecret(otherPublicKey: BinaryLike, inputEncoding?: BufferEncoding): NonSharedBuffer;
|
|
2410
2308
|
computeSecret(
|
|
2411
|
-
otherPublicKey:
|
|
2412
|
-
inputEncoding:
|
|
2413
|
-
outputEncoding:
|
|
2309
|
+
otherPublicKey: BinaryLike,
|
|
2310
|
+
inputEncoding: BufferEncoding | null | undefined,
|
|
2311
|
+
outputEncoding: BufferEncoding,
|
|
2414
2312
|
): string;
|
|
2415
2313
|
/**
|
|
2416
2314
|
* If `encoding` is specified, a string is returned; otherwise a `Buffer` is
|
|
@@ -2420,7 +2318,7 @@ declare module "node:crypto" {
|
|
|
2420
2318
|
* @return The EC Diffie-Hellman in the specified `encoding`.
|
|
2421
2319
|
*/
|
|
2422
2320
|
getPrivateKey(): NonSharedBuffer;
|
|
2423
|
-
getPrivateKey(encoding:
|
|
2321
|
+
getPrivateKey(encoding: BufferEncoding): string;
|
|
2424
2322
|
/**
|
|
2425
2323
|
* The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
|
|
2426
2324
|
*
|
|
@@ -2432,7 +2330,7 @@ declare module "node:crypto" {
|
|
|
2432
2330
|
* @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
|
|
2433
2331
|
*/
|
|
2434
2332
|
getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer;
|
|
2435
|
-
getPublicKey(encoding:
|
|
2333
|
+
getPublicKey(encoding: BufferEncoding, format?: ECDHKeyFormat): string;
|
|
2436
2334
|
/**
|
|
2437
2335
|
* Sets the EC Diffie-Hellman private key.
|
|
2438
2336
|
* If `encoding` is provided, `privateKey` is expected
|
|
@@ -2444,8 +2342,7 @@ declare module "node:crypto" {
|
|
|
2444
2342
|
* @since v0.11.14
|
|
2445
2343
|
* @param encoding The `encoding` of the `privateKey` string.
|
|
2446
2344
|
*/
|
|
2447
|
-
setPrivateKey(privateKey:
|
|
2448
|
-
setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
|
|
2345
|
+
setPrivateKey(privateKey: BinaryLike, encoding?: BufferEncoding): void;
|
|
2449
2346
|
}
|
|
2450
2347
|
/**
|
|
2451
2348
|
* Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
|
|
@@ -2480,46 +2377,22 @@ declare module "node:crypto" {
|
|
|
2480
2377
|
* not introduce timing vulnerabilities.
|
|
2481
2378
|
* @since v6.6.0
|
|
2482
2379
|
*/
|
|
2483
|
-
function timingSafeEqual(
|
|
2380
|
+
function timingSafeEqual(
|
|
2381
|
+
a: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2382
|
+
b: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2383
|
+
): boolean;
|
|
2484
2384
|
interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
|
|
2485
|
-
|
|
2486
|
-
* The prime parameter
|
|
2487
|
-
*/
|
|
2488
|
-
prime?: Buffer | undefined;
|
|
2489
|
-
/**
|
|
2490
|
-
* Prime length in bits
|
|
2491
|
-
*/
|
|
2385
|
+
prime?: NodeJS.ArrayBufferView | undefined;
|
|
2492
2386
|
primeLength?: number | undefined;
|
|
2493
|
-
/**
|
|
2494
|
-
* Custom generator
|
|
2495
|
-
* @default 2
|
|
2496
|
-
*/
|
|
2497
2387
|
generator?: number | undefined;
|
|
2498
|
-
/**
|
|
2499
|
-
* Diffie-Hellman group name
|
|
2500
|
-
* @see {@link getDiffieHellman}
|
|
2501
|
-
*/
|
|
2502
2388
|
groupName?: string | undefined;
|
|
2503
2389
|
}
|
|
2504
2390
|
interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
|
|
2505
|
-
/**
|
|
2506
|
-
* Key size in bits
|
|
2507
|
-
*/
|
|
2508
2391
|
modulusLength: number;
|
|
2509
|
-
|
|
2510
|
-
* Size of q in bits
|
|
2511
|
-
*/
|
|
2512
|
-
divisorLength: number;
|
|
2392
|
+
divisorLength?: number | undefined;
|
|
2513
2393
|
}
|
|
2514
2394
|
interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> {
|
|
2515
|
-
/**
|
|
2516
|
-
* Name of the curve to use
|
|
2517
|
-
*/
|
|
2518
2395
|
namedCurve: string;
|
|
2519
|
-
/**
|
|
2520
|
-
* Must be `'named'` or `'explicit'`
|
|
2521
|
-
* @default 'named'
|
|
2522
|
-
*/
|
|
2523
2396
|
paramEncoding?: "explicit" | "named" | undefined;
|
|
2524
2397
|
}
|
|
2525
2398
|
interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
@@ -2527,37 +2400,14 @@ declare module "node:crypto" {
|
|
|
2527
2400
|
interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2528
2401
|
interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2529
2402
|
interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
|
|
2530
|
-
/**
|
|
2531
|
-
* Key size in bits
|
|
2532
|
-
*/
|
|
2533
2403
|
modulusLength: number;
|
|
2534
|
-
/**
|
|
2535
|
-
* Public exponent
|
|
2536
|
-
* @default 0x10001
|
|
2537
|
-
*/
|
|
2538
2404
|
publicExponent?: number | undefined;
|
|
2539
|
-
/**
|
|
2540
|
-
* Name of the message digest
|
|
2541
|
-
*/
|
|
2542
2405
|
hashAlgorithm?: string | undefined;
|
|
2543
|
-
/**
|
|
2544
|
-
* Name of the message digest used by MGF1
|
|
2545
|
-
*/
|
|
2546
2406
|
mgf1HashAlgorithm?: string | undefined;
|
|
2547
|
-
/**
|
|
2548
|
-
* Minimal salt length in bytes
|
|
2549
|
-
*/
|
|
2550
2407
|
saltLength?: string | undefined;
|
|
2551
2408
|
}
|
|
2552
2409
|
interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> {
|
|
2553
|
-
/**
|
|
2554
|
-
* Key size in bits
|
|
2555
|
-
*/
|
|
2556
2410
|
modulusLength: number;
|
|
2557
|
-
/**
|
|
2558
|
-
* Public exponent
|
|
2559
|
-
* @default 0x10001
|
|
2560
|
-
*/
|
|
2561
2411
|
publicExponent?: number | undefined;
|
|
2562
2412
|
}
|
|
2563
2413
|
interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
@@ -2565,7 +2415,7 @@ declare module "node:crypto" {
|
|
|
2565
2415
|
interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
|
|
2566
2416
|
/**
|
|
2567
2417
|
* Generates a new asymmetric key pair of the given `type`. See the
|
|
2568
|
-
* supported [asymmetric key types](https://nodejs.org/docs/latest-
|
|
2418
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types).
|
|
2569
2419
|
*
|
|
2570
2420
|
* If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
|
|
2571
2421
|
* behaves as if `keyObject.export()` had been called on its result. Otherwise,
|
|
@@ -2603,7 +2453,7 @@ declare module "node:crypto" {
|
|
|
2603
2453
|
* it will be a buffer containing the data encoded as DER.
|
|
2604
2454
|
* @since v10.12.0
|
|
2605
2455
|
* @param type The asymmetric key type to generate. See the
|
|
2606
|
-
* supported [asymmetric key types](https://nodejs.org/docs/latest-
|
|
2456
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types).
|
|
2607
2457
|
*/
|
|
2608
2458
|
function generateKeyPairSync<T extends DHKeyPairOptions>(
|
|
2609
2459
|
type: "dh",
|
|
@@ -2655,7 +2505,7 @@ declare module "node:crypto" {
|
|
|
2655
2505
|
): KeyPairExportResult<T>;
|
|
2656
2506
|
/**
|
|
2657
2507
|
* Generates a new asymmetric key pair of the given `type`. See the
|
|
2658
|
-
* supported [asymmetric key types](https://nodejs.org/docs/latest-
|
|
2508
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types).
|
|
2659
2509
|
*
|
|
2660
2510
|
* If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
|
|
2661
2511
|
* behaves as if `keyObject.export()` had been called on its result. Otherwise,
|
|
@@ -2691,7 +2541,7 @@ declare module "node:crypto" {
|
|
|
2691
2541
|
* a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
|
|
2692
2542
|
* @since v10.12.0
|
|
2693
2543
|
* @param type The asymmetric key type to generate. See the
|
|
2694
|
-
* supported [asymmetric key types](https://nodejs.org/docs/latest-
|
|
2544
|
+
* supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types).
|
|
2695
2545
|
*/
|
|
2696
2546
|
function generateKeyPair<T extends DHKeyPairOptions>(
|
|
2697
2547
|
type: "dh",
|
|
@@ -2708,21 +2558,37 @@ declare module "node:crypto" {
|
|
|
2708
2558
|
options: T,
|
|
2709
2559
|
callback: KeyPairExportCallback<T>,
|
|
2710
2560
|
): void;
|
|
2561
|
+
function generateKeyPair(
|
|
2562
|
+
type: "ed25519",
|
|
2563
|
+
callback: KeyPairExportCallback,
|
|
2564
|
+
): void;
|
|
2711
2565
|
function generateKeyPair<T extends ED25519KeyPairOptions = {}>(
|
|
2712
2566
|
type: "ed25519",
|
|
2713
2567
|
options: T | undefined,
|
|
2714
2568
|
callback: KeyPairExportCallback<T>,
|
|
2715
2569
|
): void;
|
|
2570
|
+
function generateKeyPair(
|
|
2571
|
+
type: "ed448",
|
|
2572
|
+
callback: KeyPairExportCallback,
|
|
2573
|
+
): void;
|
|
2716
2574
|
function generateKeyPair<T extends ED448KeyPairOptions = {}>(
|
|
2717
2575
|
type: "ed448",
|
|
2718
2576
|
options: T | undefined,
|
|
2719
2577
|
callback: KeyPairExportCallback<T>,
|
|
2720
2578
|
): void;
|
|
2579
|
+
function generateKeyPair(
|
|
2580
|
+
type: MLDSAKeyType,
|
|
2581
|
+
callback: KeyPairExportCallback,
|
|
2582
|
+
): void;
|
|
2721
2583
|
function generateKeyPair<T extends MLDSAKeyPairOptions = {}>(
|
|
2722
2584
|
type: MLDSAKeyType,
|
|
2723
2585
|
options: T | undefined,
|
|
2724
2586
|
callback: KeyPairExportCallback<T>,
|
|
2725
2587
|
): void;
|
|
2588
|
+
function generateKeyPair(
|
|
2589
|
+
type: MLKEMKeyType,
|
|
2590
|
+
callback: KeyPairExportCallback,
|
|
2591
|
+
): void;
|
|
2726
2592
|
function generateKeyPair<T extends MLKEMKeyPairOptions = {}>(
|
|
2727
2593
|
type: MLKEMKeyType,
|
|
2728
2594
|
options: T | undefined,
|
|
@@ -2738,16 +2604,28 @@ declare module "node:crypto" {
|
|
|
2738
2604
|
options: T,
|
|
2739
2605
|
callback: KeyPairExportCallback<T>,
|
|
2740
2606
|
): void;
|
|
2607
|
+
function generateKeyPair(
|
|
2608
|
+
type: SLHDSAKeyType,
|
|
2609
|
+
callback: KeyPairExportCallback,
|
|
2610
|
+
): void;
|
|
2741
2611
|
function generateKeyPair<T extends SLHDSAKeyPairOptions = {}>(
|
|
2742
2612
|
type: SLHDSAKeyType,
|
|
2743
2613
|
options: T | undefined,
|
|
2744
2614
|
callback: KeyPairExportCallback<T>,
|
|
2745
2615
|
): void;
|
|
2616
|
+
function generateKeyPair(
|
|
2617
|
+
type: "x25519",
|
|
2618
|
+
callback: KeyPairExportCallback,
|
|
2619
|
+
): void;
|
|
2746
2620
|
function generateKeyPair<T extends X25519KeyPairOptions = {}>(
|
|
2747
2621
|
type: "x25519",
|
|
2748
2622
|
options: T | undefined,
|
|
2749
2623
|
callback: KeyPairExportCallback<T>,
|
|
2750
2624
|
): void;
|
|
2625
|
+
function generateKeyPair(
|
|
2626
|
+
type: "x448",
|
|
2627
|
+
callback: KeyPairExportCallback,
|
|
2628
|
+
): void;
|
|
2751
2629
|
function generateKeyPair<T extends X448KeyPairOptions = {}>(
|
|
2752
2630
|
type: "x448",
|
|
2753
2631
|
options: T | undefined,
|
|
@@ -2820,12 +2698,12 @@ declare module "node:crypto" {
|
|
|
2820
2698
|
*/
|
|
2821
2699
|
function sign(
|
|
2822
2700
|
algorithm: string | null | undefined,
|
|
2823
|
-
data: NodeJS.ArrayBufferView,
|
|
2701
|
+
data: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2824
2702
|
key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
|
|
2825
2703
|
): NonSharedBuffer;
|
|
2826
2704
|
function sign(
|
|
2827
2705
|
algorithm: string | null | undefined,
|
|
2828
|
-
data: NodeJS.ArrayBufferView,
|
|
2706
|
+
data: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2829
2707
|
key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
|
|
2830
2708
|
callback: (error: Error | null, data: NonSharedBuffer) => void,
|
|
2831
2709
|
): void;
|
|
@@ -2851,15 +2729,15 @@ declare module "node:crypto" {
|
|
|
2851
2729
|
*/
|
|
2852
2730
|
function verify(
|
|
2853
2731
|
algorithm: string | null | undefined,
|
|
2854
|
-
data: NodeJS.ArrayBufferView,
|
|
2732
|
+
data: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2855
2733
|
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
|
2856
|
-
signature: NodeJS.ArrayBufferView,
|
|
2734
|
+
signature: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2857
2735
|
): boolean;
|
|
2858
2736
|
function verify(
|
|
2859
2737
|
algorithm: string | null | undefined,
|
|
2860
|
-
data: NodeJS.ArrayBufferView,
|
|
2738
|
+
data: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2861
2739
|
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
|
2862
|
-
signature: NodeJS.ArrayBufferView,
|
|
2740
|
+
signature: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2863
2741
|
callback: (error: Error | null, result: boolean) => void,
|
|
2864
2742
|
): void;
|
|
2865
2743
|
/**
|
|
@@ -2882,14 +2760,18 @@ declare module "node:crypto" {
|
|
|
2882
2760
|
* @since v24.7.0
|
|
2883
2761
|
*/
|
|
2884
2762
|
function decapsulate(
|
|
2885
|
-
key: KeyLike | PrivateKeyInput | JsonWebKeyInput,
|
|
2886
|
-
ciphertext:
|
|
2763
|
+
key: KeyLike | PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput,
|
|
2764
|
+
ciphertext: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2887
2765
|
): NonSharedBuffer;
|
|
2888
2766
|
function decapsulate(
|
|
2889
|
-
key: KeyLike | PrivateKeyInput | JsonWebKeyInput,
|
|
2890
|
-
ciphertext:
|
|
2767
|
+
key: KeyLike | PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput,
|
|
2768
|
+
ciphertext: ArrayBufferLike | NodeJS.ArrayBufferView,
|
|
2891
2769
|
callback: (err: Error, sharedKey: NonSharedBuffer) => void,
|
|
2892
2770
|
): void;
|
|
2771
|
+
interface DiffieHellmanOptions {
|
|
2772
|
+
privateKey: KeyLike | PrivateKeyInput;
|
|
2773
|
+
publicKey: KeyLike | PublicKeyInput;
|
|
2774
|
+
}
|
|
2893
2775
|
/**
|
|
2894
2776
|
* Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`.
|
|
2895
2777
|
* Both keys must have the same `asymmetricKeyType` and must support either the DH or
|
|
@@ -2898,9 +2780,9 @@ declare module "node:crypto" {
|
|
|
2898
2780
|
* If the `callback` function is provided this function uses libuv's threadpool.
|
|
2899
2781
|
* @since v13.9.0, v12.17.0
|
|
2900
2782
|
*/
|
|
2901
|
-
function diffieHellman(options:
|
|
2783
|
+
function diffieHellman(options: DiffieHellmanOptions): NonSharedBuffer;
|
|
2902
2784
|
function diffieHellman(
|
|
2903
|
-
options:
|
|
2785
|
+
options: DiffieHellmanOptions,
|
|
2904
2786
|
callback: (err: Error | null, secret: NonSharedBuffer) => void,
|
|
2905
2787
|
): void;
|
|
2906
2788
|
/**
|
|
@@ -2923,10 +2805,10 @@ declare module "node:crypto" {
|
|
|
2923
2805
|
* @since v24.7.0
|
|
2924
2806
|
*/
|
|
2925
2807
|
function encapsulate(
|
|
2926
|
-
key: KeyLike | PublicKeyInput | JsonWebKeyInput,
|
|
2808
|
+
key: KeyLike | PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput,
|
|
2927
2809
|
): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer };
|
|
2928
2810
|
function encapsulate(
|
|
2929
|
-
key: KeyLike | PublicKeyInput | JsonWebKeyInput,
|
|
2811
|
+
key: KeyLike | PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput,
|
|
2930
2812
|
callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void,
|
|
2931
2813
|
): void;
|
|
2932
2814
|
interface OneShotDigestOptions {
|
|
@@ -2934,7 +2816,7 @@ declare module "node:crypto" {
|
|
|
2934
2816
|
* Encoding used to encode the returned digest.
|
|
2935
2817
|
* @default 'hex'
|
|
2936
2818
|
*/
|
|
2937
|
-
outputEncoding?:
|
|
2819
|
+
outputEncoding?: BufferEncoding | "buffer" | undefined;
|
|
2938
2820
|
/**
|
|
2939
2821
|
* For XOF hash functions such as 'shake256', the outputLength option
|
|
2940
2822
|
* can be used to specify the desired output length in bytes.
|
|
@@ -2942,7 +2824,7 @@ declare module "node:crypto" {
|
|
|
2942
2824
|
outputLength?: number | undefined;
|
|
2943
2825
|
}
|
|
2944
2826
|
interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions {
|
|
2945
|
-
outputEncoding?:
|
|
2827
|
+
outputEncoding?: BufferEncoding | undefined;
|
|
2946
2828
|
}
|
|
2947
2829
|
interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions {
|
|
2948
2830
|
outputEncoding: "buffer";
|
|
@@ -2986,7 +2868,7 @@ declare module "node:crypto" {
|
|
|
2986
2868
|
function hash(
|
|
2987
2869
|
algorithm: string,
|
|
2988
2870
|
data: BinaryLike,
|
|
2989
|
-
options?: OneShotDigestOptionsWithStringEncoding |
|
|
2871
|
+
options?: OneShotDigestOptionsWithStringEncoding | BufferEncoding,
|
|
2990
2872
|
): string;
|
|
2991
2873
|
function hash(
|
|
2992
2874
|
algorithm: string,
|
|
@@ -2996,7 +2878,7 @@ declare module "node:crypto" {
|
|
|
2996
2878
|
function hash(
|
|
2997
2879
|
algorithm: string,
|
|
2998
2880
|
data: BinaryLike,
|
|
2999
|
-
options: OneShotDigestOptions |
|
|
2881
|
+
options: OneShotDigestOptions | BufferEncoding | "buffer",
|
|
3000
2882
|
): string | NonSharedBuffer;
|
|
3001
2883
|
type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
|
|
3002
2884
|
interface CipherInfoOptions {
|
|
@@ -3010,31 +2892,11 @@ declare module "node:crypto" {
|
|
|
3010
2892
|
ivLength?: number | undefined;
|
|
3011
2893
|
}
|
|
3012
2894
|
interface CipherInfo {
|
|
3013
|
-
/**
|
|
3014
|
-
* The name of the cipher.
|
|
3015
|
-
*/
|
|
3016
2895
|
name: string;
|
|
3017
|
-
/**
|
|
3018
|
-
* The nid of the cipher.
|
|
3019
|
-
*/
|
|
3020
2896
|
nid: number;
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
* This property is omitted when mode is 'stream'.
|
|
3024
|
-
*/
|
|
3025
|
-
blockSize?: number | undefined;
|
|
3026
|
-
/**
|
|
3027
|
-
* The expected or default initialization vector length in bytes.
|
|
3028
|
-
* This property is omitted if the cipher does not use an initialization vector.
|
|
3029
|
-
*/
|
|
3030
|
-
ivLength?: number | undefined;
|
|
3031
|
-
/**
|
|
3032
|
-
* The expected or default key length in bytes.
|
|
3033
|
-
*/
|
|
2897
|
+
blockSize?: number;
|
|
2898
|
+
ivLength?: number;
|
|
3034
2899
|
keyLength: number;
|
|
3035
|
-
/**
|
|
3036
|
-
* The cipher mode.
|
|
3037
|
-
*/
|
|
3038
2900
|
mode: CipherMode;
|
|
3039
2901
|
}
|
|
3040
2902
|
/**
|
|
@@ -3078,7 +2940,7 @@ declare module "node:crypto" {
|
|
|
3078
2940
|
*/
|
|
3079
2941
|
function hkdf(
|
|
3080
2942
|
digest: string,
|
|
3081
|
-
|
|
2943
|
+
ikm: KeyLike,
|
|
3082
2944
|
salt: BinaryLike,
|
|
3083
2945
|
info: BinaryLike,
|
|
3084
2946
|
keylen: number,
|
|
@@ -3112,27 +2974,15 @@ declare module "node:crypto" {
|
|
|
3112
2974
|
*/
|
|
3113
2975
|
function hkdfSync(
|
|
3114
2976
|
digest: string,
|
|
3115
|
-
ikm:
|
|
2977
|
+
ikm: KeyLike,
|
|
3116
2978
|
salt: BinaryLike,
|
|
3117
2979
|
info: BinaryLike,
|
|
3118
2980
|
keylen: number,
|
|
3119
2981
|
): ArrayBuffer;
|
|
3120
2982
|
interface SecureHeapUsage {
|
|
3121
|
-
/**
|
|
3122
|
-
* The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag.
|
|
3123
|
-
*/
|
|
3124
2983
|
total: number;
|
|
3125
|
-
/**
|
|
3126
|
-
* The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag.
|
|
3127
|
-
*/
|
|
3128
2984
|
min: number;
|
|
3129
|
-
/**
|
|
3130
|
-
* The total number of bytes currently allocated from the secure heap.
|
|
3131
|
-
*/
|
|
3132
2985
|
used: number;
|
|
3133
|
-
/**
|
|
3134
|
-
* The calculated ratio of `used` to `total` allocated bytes.
|
|
3135
|
-
*/
|
|
3136
2986
|
utilization: number;
|
|
3137
2987
|
}
|
|
3138
2988
|
/**
|
|
@@ -3145,11 +2995,11 @@ declare module "node:crypto" {
|
|
|
3145
2995
|
* Node.js will pre-emptively generate and persistently cache enough
|
|
3146
2996
|
* random data to generate up to 128 random UUIDs. To generate a UUID
|
|
3147
2997
|
* without using the cache, set `disableEntropyCache` to `true`.
|
|
3148
|
-
*
|
|
3149
2998
|
* @default `false`
|
|
3150
2999
|
*/
|
|
3151
3000
|
disableEntropyCache?: boolean | undefined;
|
|
3152
3001
|
}
|
|
3002
|
+
interface RandomUUIDV7Options extends RandomUUIDOptions {}
|
|
3153
3003
|
type UUID = `${string}-${string}-${string}-${string}-${string}`;
|
|
3154
3004
|
/**
|
|
3155
3005
|
* Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
|
|
@@ -3157,26 +3007,21 @@ declare module "node:crypto" {
|
|
|
3157
3007
|
* @since v15.6.0, v14.17.0
|
|
3158
3008
|
*/
|
|
3159
3009
|
function randomUUID(options?: RandomUUIDOptions): UUID;
|
|
3010
|
+
/**
|
|
3011
|
+
* Generates a random [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562.txt) version 7 UUID. The UUID contains a millisecond
|
|
3012
|
+
* precision Unix timestamp in the most significant 48 bits, followed by
|
|
3013
|
+
* cryptographically secure random bits for the remaining fields, making it
|
|
3014
|
+
* suitable for use as a database key with time-based sorting. The embedded
|
|
3015
|
+
* timestamp relies on a non-monotonic clock and is not guaranteed to be strictly
|
|
3016
|
+
* increasing.
|
|
3017
|
+
* @since v26.1.0
|
|
3018
|
+
*/
|
|
3019
|
+
function randomUUIDv7(options?: RandomUUIDV7Options): UUID;
|
|
3160
3020
|
interface X509CheckOptions {
|
|
3161
|
-
/**
|
|
3162
|
-
* @default 'always'
|
|
3163
|
-
*/
|
|
3164
3021
|
subject?: "always" | "default" | "never" | undefined;
|
|
3165
|
-
/**
|
|
3166
|
-
* @default true
|
|
3167
|
-
*/
|
|
3168
3022
|
wildcards?: boolean | undefined;
|
|
3169
|
-
/**
|
|
3170
|
-
* @default true
|
|
3171
|
-
*/
|
|
3172
3023
|
partialWildcards?: boolean | undefined;
|
|
3173
|
-
/**
|
|
3174
|
-
* @default false
|
|
3175
|
-
*/
|
|
3176
3024
|
multiLabelWildcards?: boolean | undefined;
|
|
3177
|
-
/**
|
|
3178
|
-
* @default false
|
|
3179
|
-
*/
|
|
3180
3025
|
singleLabelSubdomains?: boolean | undefined;
|
|
3181
3026
|
}
|
|
3182
3027
|
/**
|
|
@@ -3329,7 +3174,7 @@ declare module "node:crypto" {
|
|
|
3329
3174
|
* @since v22.10.0
|
|
3330
3175
|
*/
|
|
3331
3176
|
readonly validToDate: Date;
|
|
3332
|
-
constructor(buffer:
|
|
3177
|
+
constructor(buffer: string | NodeJS.ArrayBufferView);
|
|
3333
3178
|
/**
|
|
3334
3179
|
* Checks whether the certificate matches the given email address.
|
|
3335
3180
|
*
|
|
@@ -3432,13 +3277,10 @@ declare module "node:crypto" {
|
|
|
3432
3277
|
*/
|
|
3433
3278
|
verify(publicKey: KeyObject): boolean;
|
|
3434
3279
|
}
|
|
3435
|
-
type LargeNumberLike = NodeJS.ArrayBufferView |
|
|
3280
|
+
type LargeNumberLike = ArrayBufferLike | NodeJS.ArrayBufferView | bigint;
|
|
3436
3281
|
interface GeneratePrimeOptions {
|
|
3437
3282
|
add?: LargeNumberLike | undefined;
|
|
3438
3283
|
rem?: LargeNumberLike | undefined;
|
|
3439
|
-
/**
|
|
3440
|
-
* @default false
|
|
3441
|
-
*/
|
|
3442
3284
|
safe?: boolean | undefined;
|
|
3443
3285
|
bigint?: boolean | undefined;
|
|
3444
3286
|
}
|
|
@@ -3478,13 +3320,13 @@ declare module "node:crypto" {
|
|
|
3478
3320
|
function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
|
|
3479
3321
|
function generatePrime(
|
|
3480
3322
|
size: number,
|
|
3481
|
-
options:
|
|
3482
|
-
callback: (err: Error | null, prime:
|
|
3323
|
+
options: GeneratePrimeOptionsArrayBuffer,
|
|
3324
|
+
callback: (err: Error | null, prime: ArrayBuffer) => void,
|
|
3483
3325
|
): void;
|
|
3484
3326
|
function generatePrime(
|
|
3485
3327
|
size: number,
|
|
3486
|
-
options:
|
|
3487
|
-
callback: (err: Error | null, prime:
|
|
3328
|
+
options: GeneratePrimeOptionsBigInt,
|
|
3329
|
+
callback: (err: Error | null, prime: bigint) => void,
|
|
3488
3330
|
): void;
|
|
3489
3331
|
function generatePrime(
|
|
3490
3332
|
size: number,
|
|
@@ -3519,8 +3361,8 @@ declare module "node:crypto" {
|
|
|
3519
3361
|
* @param size The size (in bits) of the prime to generate.
|
|
3520
3362
|
*/
|
|
3521
3363
|
function generatePrimeSync(size: number): ArrayBuffer;
|
|
3522
|
-
function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
|
|
3523
3364
|
function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer;
|
|
3365
|
+
function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
|
|
3524
3366
|
function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint;
|
|
3525
3367
|
interface CheckPrimeOptions {
|
|
3526
3368
|
/**
|
|
@@ -3528,7 +3370,6 @@ declare module "node:crypto" {
|
|
|
3528
3370
|
* When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input.
|
|
3529
3371
|
* Care must be used when selecting a number of checks.
|
|
3530
3372
|
* Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details.
|
|
3531
|
-
*
|
|
3532
3373
|
* @default 0
|
|
3533
3374
|
*/
|
|
3534
3375
|
checks?: number | undefined;
|
|
@@ -3588,47 +3429,14 @@ declare module "node:crypto" {
|
|
|
3588
3429
|
>(typedArray: T): T;
|
|
3589
3430
|
type Argon2Algorithm = "argon2d" | "argon2i" | "argon2id";
|
|
3590
3431
|
interface Argon2Parameters {
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
*/
|
|
3594
|
-
message: string | ArrayBuffer | NodeJS.ArrayBufferView;
|
|
3595
|
-
/**
|
|
3596
|
-
* REQUIRED, must be at least 8 bytes long. This is the salt for password hashing applications of Argon2.
|
|
3597
|
-
*/
|
|
3598
|
-
nonce: string | ArrayBuffer | NodeJS.ArrayBufferView;
|
|
3599
|
-
/**
|
|
3600
|
-
* REQUIRED, degree of parallelism determines how many computational chains (lanes)
|
|
3601
|
-
* can be run. Must be greater than 1 and less than `2**24-1`.
|
|
3602
|
-
*/
|
|
3432
|
+
message: BinaryLike;
|
|
3433
|
+
nonce: BinaryLike;
|
|
3603
3434
|
parallelism: number;
|
|
3604
|
-
/**
|
|
3605
|
-
* REQUIRED, the length of the key to generate. Must be greater than 4 and
|
|
3606
|
-
* less than `2**32-1`.
|
|
3607
|
-
*/
|
|
3608
3435
|
tagLength: number;
|
|
3609
|
-
/**
|
|
3610
|
-
* REQUIRED, memory cost in 1KiB blocks. Must be greater than
|
|
3611
|
-
* `8 * parallelism` and less than `2**32-1`. The actual number of blocks is rounded
|
|
3612
|
-
* down to the nearest multiple of `4 * parallelism`.
|
|
3613
|
-
*/
|
|
3614
3436
|
memory: number;
|
|
3615
|
-
/**
|
|
3616
|
-
* REQUIRED, number of passes (iterations). Must be greater than 1 and less
|
|
3617
|
-
* than `2**32-1`.
|
|
3618
|
-
*/
|
|
3619
3437
|
passes: number;
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
* similar to the salt, that should **NOT** be stored with the derived key. This is known as pepper in
|
|
3623
|
-
* password hashing applications. If used, must have a length not greater than `2**32-1` bytes.
|
|
3624
|
-
*/
|
|
3625
|
-
secret?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined;
|
|
3626
|
-
/**
|
|
3627
|
-
* OPTIONAL, Additional data to
|
|
3628
|
-
* be added to the hash, functionally equivalent to salt or secret, but meant for
|
|
3629
|
-
* non-random data. If used, must have a length not greater than `2**32-1` bytes.
|
|
3630
|
-
*/
|
|
3631
|
-
associatedData?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined;
|
|
3438
|
+
secret?: BinaryLike | undefined;
|
|
3439
|
+
associatedData?: BinaryLike | undefined;
|
|
3632
3440
|
}
|
|
3633
3441
|
/**
|
|
3634
3442
|
* Provides an asynchronous [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html) implementation. Argon2 is a password-based
|
|
@@ -3639,7 +3447,7 @@ declare module "node:crypto" {
|
|
|
3639
3447
|
* random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
|
|
3640
3448
|
*
|
|
3641
3449
|
* When passing strings for `message`, `nonce`, `secret` or `associatedData`, please
|
|
3642
|
-
* consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-
|
|
3450
|
+
* consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v26.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis).
|
|
3643
3451
|
*
|
|
3644
3452
|
* The `callback` function is called with two arguments: `err` and `derivedKey`.
|
|
3645
3453
|
* `err` is an exception object when key derivation fails, otherwise `err` is
|
|
@@ -3683,7 +3491,7 @@ declare module "node:crypto" {
|
|
|
3683
3491
|
* random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
|
|
3684
3492
|
*
|
|
3685
3493
|
* When passing strings for `message`, `nonce`, `secret` or `associatedData`, please
|
|
3686
|
-
* consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-
|
|
3494
|
+
* consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v26.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis).
|
|
3687
3495
|
*
|
|
3688
3496
|
* An exception is thrown when key derivation fails, otherwise the derived key is
|
|
3689
3497
|
* returned as a `Buffer`.
|
|
@@ -4052,6 +3860,94 @@ declare module "node:crypto" {
|
|
|
4052
3860
|
): Promise<ArrayBuffer>;
|
|
4053
3861
|
}
|
|
4054
3862
|
}
|
|
3863
|
+
/**
|
|
3864
|
+
* An object containing commonly used constants for crypto and security related
|
|
3865
|
+
* operations. The specific constants currently defined are described in
|
|
3866
|
+
* [Crypto constants](https://nodejs.org/docs/latest-v26.x/api/crypto.html#crypto-constants).
|
|
3867
|
+
* @since v6.3.0
|
|
3868
|
+
*/
|
|
3869
|
+
namespace constants {
|
|
3870
|
+
const OPENSSL_VERSION_NUMBER: number;
|
|
3871
|
+
const SSL_OP_ALL: number;
|
|
3872
|
+
const SSL_OP_ALLOW_NO_DHE_KEX: number;
|
|
3873
|
+
const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
|
|
3874
|
+
const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
|
|
3875
|
+
const SSL_OP_CISCO_ANYCONNECT: number;
|
|
3876
|
+
const SSL_OP_COOKIE_EXCHANGE: number;
|
|
3877
|
+
const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
|
|
3878
|
+
const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
|
|
3879
|
+
const SSL_OP_LEGACY_SERVER_CONNECT: number;
|
|
3880
|
+
const SSL_OP_NO_COMPRESSION: number;
|
|
3881
|
+
const SSL_OP_NO_ENCRYPT_THEN_MAC: number;
|
|
3882
|
+
const SSL_OP_NO_QUERY_MTU: number;
|
|
3883
|
+
const SSL_OP_NO_RENEGOTIATION: number;
|
|
3884
|
+
const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
|
|
3885
|
+
const SSL_OP_NO_SSLv2: number;
|
|
3886
|
+
const SSL_OP_NO_SSLv3: number;
|
|
3887
|
+
const SSL_OP_NO_TICKET: number;
|
|
3888
|
+
const SSL_OP_NO_TLSv1: number;
|
|
3889
|
+
const SSL_OP_NO_TLSv1_1: number;
|
|
3890
|
+
const SSL_OP_NO_TLSv1_2: number;
|
|
3891
|
+
const SSL_OP_NO_TLSv1_3: number;
|
|
3892
|
+
const SSL_OP_PRIORITIZE_CHACHA: number;
|
|
3893
|
+
const SSL_OP_TLS_ROLLBACK_BUG: number;
|
|
3894
|
+
const ENGINE_METHOD_RSA: number;
|
|
3895
|
+
const ENGINE_METHOD_DSA: number;
|
|
3896
|
+
const ENGINE_METHOD_DH: number;
|
|
3897
|
+
const ENGINE_METHOD_RAND: number;
|
|
3898
|
+
const ENGINE_METHOD_EC: number;
|
|
3899
|
+
const ENGINE_METHOD_CIPHERS: number;
|
|
3900
|
+
const ENGINE_METHOD_DIGESTS: number;
|
|
3901
|
+
const ENGINE_METHOD_PKEY_METHS: number;
|
|
3902
|
+
const ENGINE_METHOD_PKEY_ASN1_METHS: number;
|
|
3903
|
+
const ENGINE_METHOD_ALL: number;
|
|
3904
|
+
const ENGINE_METHOD_NONE: number;
|
|
3905
|
+
const DH_CHECK_P_NOT_SAFE_PRIME: number;
|
|
3906
|
+
const DH_CHECK_P_NOT_PRIME: number;
|
|
3907
|
+
const DH_UNABLE_TO_CHECK_GENERATOR: number;
|
|
3908
|
+
const DH_NOT_SUITABLE_GENERATOR: number;
|
|
3909
|
+
const RSA_PKCS1_PADDING: number;
|
|
3910
|
+
const RSA_NO_PADDING: number;
|
|
3911
|
+
const RSA_PKCS1_OAEP_PADDING: number;
|
|
3912
|
+
const RSA_X931_PADDING: number;
|
|
3913
|
+
const RSA_PKCS1_PSS_PADDING: number;
|
|
3914
|
+
const RSA_PSS_SALTLEN_DIGEST: number;
|
|
3915
|
+
const RSA_PSS_SALTLEN_MAX_SIGN: number;
|
|
3916
|
+
const RSA_PSS_SALTLEN_AUTO: number;
|
|
3917
|
+
const TLS1_VERSION: number;
|
|
3918
|
+
const TLS1_1_VERSION: number;
|
|
3919
|
+
const TLS1_2_VERSION: number;
|
|
3920
|
+
const TLS1_3_VERSION: number;
|
|
3921
|
+
const POINT_CONVERSION_COMPRESSED: number;
|
|
3922
|
+
const POINT_CONVERSION_UNCOMPRESSED: number;
|
|
3923
|
+
const POINT_CONVERSION_HYBRID: number;
|
|
3924
|
+
const defaultCipherList: string;
|
|
3925
|
+
const defaultCoreCipherList: string;
|
|
3926
|
+
}
|
|
3927
|
+
// TODO: remove in future major version
|
|
3928
|
+
/** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */
|
|
3929
|
+
type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary";
|
|
3930
|
+
/** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */
|
|
3931
|
+
type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1";
|
|
3932
|
+
/** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */
|
|
3933
|
+
type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
|
|
3934
|
+
/** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */
|
|
3935
|
+
type Encoding = BufferEncoding;
|
|
3936
|
+
/** @deprecated This type will be removed in a future version. Use `KeyLike` instead. */
|
|
3937
|
+
type CipherKey = KeyLike;
|
|
3938
|
+
/** @deprecated This type will be removed in a future version. */
|
|
3939
|
+
interface RsaPrivateKey {
|
|
3940
|
+
key: KeyLike;
|
|
3941
|
+
passphrase?: string | undefined;
|
|
3942
|
+
oaepHash?: string | undefined;
|
|
3943
|
+
oaepLabel?: NodeJS.TypedArray | undefined;
|
|
3944
|
+
padding?: number | undefined;
|
|
3945
|
+
}
|
|
3946
|
+
/** @deprecated This type will be removed in a future version. */
|
|
3947
|
+
interface RsaPublicKey {
|
|
3948
|
+
key: KeyLike;
|
|
3949
|
+
padding?: number | undefined;
|
|
3950
|
+
}
|
|
4055
3951
|
}
|
|
4056
3952
|
declare module "crypto" {
|
|
4057
3953
|
export * from "node:crypto";
|