cdk-ecr-deployment 2.5.30 → 2.5.32
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/.gitattributes +1 -1
- package/.jsii +129 -27
- package/.jsii.tabl.json +1 -1
- package/.projenrc.ts +3 -1
- package/API.md +2 -0
- package/lambda/install.js +7 -6
- package/lib/index.d.ts +10 -0
- package/lib/index.js +6 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +48 -24
- package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +15 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +43 -35
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +267 -122
- package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +17 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +755 -269
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +86 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +28 -25
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +203 -62
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +127 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +115 -73
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +560 -315
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +96 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +359 -195
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +629 -377
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -46
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +187 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +154 -93
- package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +9 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +88 -95
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +166 -128
- package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +498 -218
- package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +398 -170
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +34 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +162 -71
- package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +17 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +79 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +359 -195
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +187 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +154 -93
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +9 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +166 -128
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +398 -170
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +40 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +263 -129
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +9 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +40 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +263 -129
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +52 -45
- package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +9 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +83 -85
- package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/@types/http-cache-semantics/LICENSE +0 -0
- package/node_modules/@types/http-cache-semantics/README.md +1 -2
- package/node_modules/@types/http-cache-semantics/index.d.ts +1 -6
- package/node_modules/@types/http-cache-semantics/package.json +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +48 -24
- package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +15 -6
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +43 -35
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +267 -122
- package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +17 -14
- package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +755 -269
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +86 -45
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +28 -25
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +203 -62
- package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +127 -7
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +115 -73
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +560 -315
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +96 -18
- package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +359 -195
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +629 -377
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -46
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2 -3
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +187 -16
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +154 -93
- package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +9 -9
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +88 -95
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +166 -128
- package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +498 -218
- package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +398 -170
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +34 -9
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +162 -71
- package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +17 -14
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +79 -7
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +359 -195
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +187 -16
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +154 -93
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +9 -9
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +166 -128
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +398 -170
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +40 -14
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +263 -129
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +9 -3
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
- package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +40 -14
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +263 -129
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +52 -45
- package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +9 -3
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +83 -85
- package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/@types/responselike/LICENSE +21 -21
- package/node_modules/@types/responselike/README.md +39 -7
- package/node_modules/@types/responselike/index.d.ts +3 -8
- package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +48 -24
- package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +15 -6
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +43 -35
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +267 -122
- package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +17 -14
- package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +755 -269
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +86 -45
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +28 -25
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +203 -62
- package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +127 -7
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +115 -73
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +560 -315
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +96 -18
- package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +359 -195
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +629 -377
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -46
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2 -3
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +187 -16
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +154 -93
- package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +9 -9
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +88 -95
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +166 -128
- package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +498 -218
- package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +398 -170
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +34 -9
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +162 -71
- package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +17 -14
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +79 -7
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +359 -195
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +187 -16
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +154 -93
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +9 -9
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +166 -128
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +398 -170
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +40 -14
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +263 -129
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +9 -3
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
- package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +40 -14
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +263 -129
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +52 -45
- package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +9 -3
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +83 -85
- package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/@types/responselike/package.json +9 -7
- package/node_modules/keyv/README.md +2 -0
- package/node_modules/keyv/package.json +13 -14
- package/node_modules/keyv/src/index.d.ts +6 -10
- package/node_modules/keyv/src/index.js +7 -12
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +97 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/node_modules/undici-types/errors.d.ts +128 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +9 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +63 -0
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +71 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +28 -0
- package/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/node_modules/undici-types/readable.d.ts +61 -0
- package/node_modules/undici-types/webidl.d.ts +220 -0
- package/node_modules/undici-types/websocket.d.ts +131 -0
- package/package.json +10 -11
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/buffer-stream.js +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/index.d.ts +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/index.js +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/license +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/package.json +0 -0
- /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/readme.md +0 -0
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* ```
|
|
17
17
|
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/crypto.js)
|
|
18
18
|
*/
|
|
19
|
-
declare module
|
|
20
|
-
import * as stream from
|
|
21
|
-
import { PeerCertificate } from
|
|
19
|
+
declare module "crypto" {
|
|
20
|
+
import * as stream from "node:stream";
|
|
21
|
+
import { PeerCertificate } from "node:tls";
|
|
22
22
|
/**
|
|
23
23
|
* SPKAC is a Certificate Signing Request mechanism originally implemented by
|
|
24
24
|
* Netscape and was specified formally as part of HTML5's `keygen` element.
|
|
@@ -259,11 +259,11 @@ declare module 'crypto' {
|
|
|
259
259
|
*/
|
|
260
260
|
function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
|
|
261
261
|
// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
|
|
262
|
-
type BinaryToTextEncoding =
|
|
263
|
-
type CharacterEncoding =
|
|
264
|
-
type LegacyCharacterEncoding =
|
|
262
|
+
type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary";
|
|
263
|
+
type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1";
|
|
264
|
+
type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
|
|
265
265
|
type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
|
|
266
|
-
type ECDHKeyFormat =
|
|
266
|
+
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
|
|
267
267
|
/**
|
|
268
268
|
* The `Hash` class is a utility for creating hash digests of data. It can be
|
|
269
269
|
* used in one of two ways:
|
|
@@ -482,15 +482,15 @@ declare module 'crypto' {
|
|
|
482
482
|
digest(): Buffer;
|
|
483
483
|
digest(encoding: BinaryToTextEncoding): string;
|
|
484
484
|
}
|
|
485
|
-
type KeyObjectType =
|
|
485
|
+
type KeyObjectType = "secret" | "public" | "private";
|
|
486
486
|
interface KeyExportOptions<T extends KeyFormat> {
|
|
487
|
-
type:
|
|
487
|
+
type: "pkcs1" | "spki" | "pkcs8" | "sec1";
|
|
488
488
|
format: T;
|
|
489
489
|
cipher?: string | undefined;
|
|
490
490
|
passphrase?: string | Buffer | undefined;
|
|
491
491
|
}
|
|
492
492
|
interface JwkKeyExportOptions {
|
|
493
|
-
format:
|
|
493
|
+
format: "jwk";
|
|
494
494
|
}
|
|
495
495
|
interface JsonWebKey {
|
|
496
496
|
crv?: string | undefined;
|
|
@@ -634,8 +634,8 @@ declare module 'crypto' {
|
|
|
634
634
|
* PKCS#1 and SEC1 encryption.
|
|
635
635
|
* @since v11.6.0
|
|
636
636
|
*/
|
|
637
|
-
export(options: KeyExportOptions<
|
|
638
|
-
export(options?: KeyExportOptions<
|
|
637
|
+
export(options: KeyExportOptions<"pem">): string | Buffer;
|
|
638
|
+
export(options?: KeyExportOptions<"der">): Buffer;
|
|
639
639
|
export(options?: JwkKeyExportOptions): JsonWebKey;
|
|
640
640
|
/**
|
|
641
641
|
* For secret keys, this property represents the size of the key in bytes. This
|
|
@@ -650,9 +650,9 @@ declare module 'crypto' {
|
|
|
650
650
|
*/
|
|
651
651
|
type: KeyObjectType;
|
|
652
652
|
}
|
|
653
|
-
type CipherCCMTypes =
|
|
654
|
-
type CipherGCMTypes =
|
|
655
|
-
type CipherOCBTypes =
|
|
653
|
+
type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm" | "chacha20-poly1305";
|
|
654
|
+
type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
|
|
655
|
+
type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";
|
|
656
656
|
type BinaryLike = string | NodeJS.ArrayBufferView;
|
|
657
657
|
type CipherKey = BinaryLike | KeyObject;
|
|
658
658
|
interface CipherCCMOptions extends stream.TransformOptions {
|
|
@@ -736,10 +736,30 @@ declare module 'crypto' {
|
|
|
736
736
|
* @since v0.1.94
|
|
737
737
|
* @param options `stream.transform` options
|
|
738
738
|
*/
|
|
739
|
-
function createCipheriv(
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
739
|
+
function createCipheriv(
|
|
740
|
+
algorithm: CipherCCMTypes,
|
|
741
|
+
key: CipherKey,
|
|
742
|
+
iv: BinaryLike,
|
|
743
|
+
options: CipherCCMOptions,
|
|
744
|
+
): CipherCCM;
|
|
745
|
+
function createCipheriv(
|
|
746
|
+
algorithm: CipherOCBTypes,
|
|
747
|
+
key: CipherKey,
|
|
748
|
+
iv: BinaryLike,
|
|
749
|
+
options: CipherOCBOptions,
|
|
750
|
+
): CipherOCB;
|
|
751
|
+
function createCipheriv(
|
|
752
|
+
algorithm: CipherGCMTypes,
|
|
753
|
+
key: CipherKey,
|
|
754
|
+
iv: BinaryLike,
|
|
755
|
+
options?: CipherGCMOptions,
|
|
756
|
+
): CipherGCM;
|
|
757
|
+
function createCipheriv(
|
|
758
|
+
algorithm: string,
|
|
759
|
+
key: CipherKey,
|
|
760
|
+
iv: BinaryLike | null,
|
|
761
|
+
options?: stream.TransformOptions,
|
|
762
|
+
): Cipher;
|
|
743
763
|
/**
|
|
744
764
|
* Instances of the `Cipher` class are used to encrypt data. The class can be
|
|
745
765
|
* used in one of two ways:
|
|
@@ -911,7 +931,7 @@ declare module 'crypto' {
|
|
|
911
931
|
buffer: NodeJS.ArrayBufferView,
|
|
912
932
|
options: {
|
|
913
933
|
plaintextLength: number;
|
|
914
|
-
}
|
|
934
|
+
},
|
|
915
935
|
): this;
|
|
916
936
|
getAuthTag(): Buffer;
|
|
917
937
|
}
|
|
@@ -920,7 +940,7 @@ declare module 'crypto' {
|
|
|
920
940
|
buffer: NodeJS.ArrayBufferView,
|
|
921
941
|
options?: {
|
|
922
942
|
plaintextLength: number;
|
|
923
|
-
}
|
|
943
|
+
},
|
|
924
944
|
): this;
|
|
925
945
|
getAuthTag(): Buffer;
|
|
926
946
|
}
|
|
@@ -929,7 +949,7 @@ declare module 'crypto' {
|
|
|
929
949
|
buffer: NodeJS.ArrayBufferView,
|
|
930
950
|
options?: {
|
|
931
951
|
plaintextLength: number;
|
|
932
|
-
}
|
|
952
|
+
},
|
|
933
953
|
): this;
|
|
934
954
|
getAuthTag(): Buffer;
|
|
935
955
|
}
|
|
@@ -993,10 +1013,30 @@ declare module 'crypto' {
|
|
|
993
1013
|
* @since v0.1.94
|
|
994
1014
|
* @param options `stream.transform` options
|
|
995
1015
|
*/
|
|
996
|
-
function createDecipheriv(
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1016
|
+
function createDecipheriv(
|
|
1017
|
+
algorithm: CipherCCMTypes,
|
|
1018
|
+
key: CipherKey,
|
|
1019
|
+
iv: BinaryLike,
|
|
1020
|
+
options: CipherCCMOptions,
|
|
1021
|
+
): DecipherCCM;
|
|
1022
|
+
function createDecipheriv(
|
|
1023
|
+
algorithm: CipherOCBTypes,
|
|
1024
|
+
key: CipherKey,
|
|
1025
|
+
iv: BinaryLike,
|
|
1026
|
+
options: CipherOCBOptions,
|
|
1027
|
+
): DecipherOCB;
|
|
1028
|
+
function createDecipheriv(
|
|
1029
|
+
algorithm: CipherGCMTypes,
|
|
1030
|
+
key: CipherKey,
|
|
1031
|
+
iv: BinaryLike,
|
|
1032
|
+
options?: CipherGCMOptions,
|
|
1033
|
+
): DecipherGCM;
|
|
1034
|
+
function createDecipheriv(
|
|
1035
|
+
algorithm: string,
|
|
1036
|
+
key: CipherKey,
|
|
1037
|
+
iv: BinaryLike | null,
|
|
1038
|
+
options?: stream.TransformOptions,
|
|
1039
|
+
): Decipher;
|
|
1000
1040
|
/**
|
|
1001
1041
|
* Instances of the `Decipher` class are used to decrypt data. The class can be
|
|
1002
1042
|
* used in one of two ways:
|
|
@@ -1155,7 +1195,7 @@ declare module 'crypto' {
|
|
|
1155
1195
|
buffer: NodeJS.ArrayBufferView,
|
|
1156
1196
|
options: {
|
|
1157
1197
|
plaintextLength: number;
|
|
1158
|
-
}
|
|
1198
|
+
},
|
|
1159
1199
|
): this;
|
|
1160
1200
|
}
|
|
1161
1201
|
interface DecipherGCM extends Decipher {
|
|
@@ -1164,7 +1204,7 @@ declare module 'crypto' {
|
|
|
1164
1204
|
buffer: NodeJS.ArrayBufferView,
|
|
1165
1205
|
options?: {
|
|
1166
1206
|
plaintextLength: number;
|
|
1167
|
-
}
|
|
1207
|
+
},
|
|
1168
1208
|
): this;
|
|
1169
1209
|
}
|
|
1170
1210
|
interface DecipherOCB extends Decipher {
|
|
@@ -1173,20 +1213,20 @@ declare module 'crypto' {
|
|
|
1173
1213
|
buffer: NodeJS.ArrayBufferView,
|
|
1174
1214
|
options?: {
|
|
1175
1215
|
plaintextLength: number;
|
|
1176
|
-
}
|
|
1216
|
+
},
|
|
1177
1217
|
): this;
|
|
1178
1218
|
}
|
|
1179
1219
|
interface PrivateKeyInput {
|
|
1180
1220
|
key: string | Buffer;
|
|
1181
1221
|
format?: KeyFormat | undefined;
|
|
1182
|
-
type?:
|
|
1222
|
+
type?: "pkcs1" | "pkcs8" | "sec1" | undefined;
|
|
1183
1223
|
passphrase?: string | Buffer | undefined;
|
|
1184
1224
|
encoding?: string | undefined;
|
|
1185
1225
|
}
|
|
1186
1226
|
interface PublicKeyInput {
|
|
1187
1227
|
key: string | Buffer;
|
|
1188
1228
|
format?: KeyFormat | undefined;
|
|
1189
|
-
type?:
|
|
1229
|
+
type?: "pkcs1" | "spki" | undefined;
|
|
1190
1230
|
encoding?: string | undefined;
|
|
1191
1231
|
}
|
|
1192
1232
|
/**
|
|
@@ -1209,11 +1249,11 @@ declare module 'crypto' {
|
|
|
1209
1249
|
* @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
|
|
1210
1250
|
*/
|
|
1211
1251
|
function generateKey(
|
|
1212
|
-
type:
|
|
1252
|
+
type: "hmac" | "aes",
|
|
1213
1253
|
options: {
|
|
1214
1254
|
length: number;
|
|
1215
1255
|
},
|
|
1216
|
-
callback: (err: Error | null, key: KeyObject) => void
|
|
1256
|
+
callback: (err: Error | null, key: KeyObject) => void,
|
|
1217
1257
|
): void;
|
|
1218
1258
|
/**
|
|
1219
1259
|
* Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
|
|
@@ -1233,14 +1273,14 @@ declare module 'crypto' {
|
|
|
1233
1273
|
* @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
|
|
1234
1274
|
*/
|
|
1235
1275
|
function generateKeySync(
|
|
1236
|
-
type:
|
|
1276
|
+
type: "hmac" | "aes",
|
|
1237
1277
|
options: {
|
|
1238
1278
|
length: number;
|
|
1239
|
-
}
|
|
1279
|
+
},
|
|
1240
1280
|
): KeyObject;
|
|
1241
1281
|
interface JsonWebKeyInput {
|
|
1242
1282
|
key: JsonWebKey;
|
|
1243
|
-
format:
|
|
1283
|
+
format: "jwk";
|
|
1244
1284
|
}
|
|
1245
1285
|
/**
|
|
1246
1286
|
* Creates and returns a new key object containing a private key. If `key` is a
|
|
@@ -1287,7 +1327,7 @@ declare module 'crypto' {
|
|
|
1287
1327
|
* @param options `stream.Writable` options
|
|
1288
1328
|
*/
|
|
1289
1329
|
function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
|
|
1290
|
-
type DSAEncoding =
|
|
1330
|
+
type DSAEncoding = "der" | "ieee-p1363";
|
|
1291
1331
|
interface SigningOptions {
|
|
1292
1332
|
/**
|
|
1293
1333
|
* @see crypto.constants.RSA_PKCS1_PADDING
|
|
@@ -1396,7 +1436,10 @@ declare module 'crypto' {
|
|
|
1396
1436
|
* @since v0.1.92
|
|
1397
1437
|
*/
|
|
1398
1438
|
sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
|
|
1399
|
-
sign(
|
|
1439
|
+
sign(
|
|
1440
|
+
privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
|
|
1441
|
+
outputFormat: BinaryToTextEncoding,
|
|
1442
|
+
): string;
|
|
1400
1443
|
}
|
|
1401
1444
|
/**
|
|
1402
1445
|
* Creates and returns a `Verify` object that uses the given algorithm.
|
|
@@ -1459,8 +1502,15 @@ declare module 'crypto' {
|
|
|
1459
1502
|
* be passed instead of a public key.
|
|
1460
1503
|
* @since v0.1.92
|
|
1461
1504
|
*/
|
|
1462
|
-
verify(
|
|
1463
|
-
|
|
1505
|
+
verify(
|
|
1506
|
+
object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
|
1507
|
+
signature: NodeJS.ArrayBufferView,
|
|
1508
|
+
): boolean;
|
|
1509
|
+
verify(
|
|
1510
|
+
object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
|
1511
|
+
signature: string,
|
|
1512
|
+
signature_format?: BinaryToTextEncoding,
|
|
1513
|
+
): boolean;
|
|
1464
1514
|
}
|
|
1465
1515
|
/**
|
|
1466
1516
|
* Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
|
|
@@ -1479,10 +1529,26 @@ declare module 'crypto' {
|
|
|
1479
1529
|
* @param generatorEncoding The `encoding` of the `generator` string.
|
|
1480
1530
|
*/
|
|
1481
1531
|
function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
|
|
1482
|
-
function createDiffieHellman(
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1532
|
+
function createDiffieHellman(
|
|
1533
|
+
prime: ArrayBuffer | NodeJS.ArrayBufferView,
|
|
1534
|
+
generator?: number | ArrayBuffer | NodeJS.ArrayBufferView,
|
|
1535
|
+
): DiffieHellman;
|
|
1536
|
+
function createDiffieHellman(
|
|
1537
|
+
prime: ArrayBuffer | NodeJS.ArrayBufferView,
|
|
1538
|
+
generator: string,
|
|
1539
|
+
generatorEncoding: BinaryToTextEncoding,
|
|
1540
|
+
): DiffieHellman;
|
|
1541
|
+
function createDiffieHellman(
|
|
1542
|
+
prime: string,
|
|
1543
|
+
primeEncoding: BinaryToTextEncoding,
|
|
1544
|
+
generator?: number | ArrayBuffer | NodeJS.ArrayBufferView,
|
|
1545
|
+
): DiffieHellman;
|
|
1546
|
+
function createDiffieHellman(
|
|
1547
|
+
prime: string,
|
|
1548
|
+
primeEncoding: BinaryToTextEncoding,
|
|
1549
|
+
generator: string,
|
|
1550
|
+
generatorEncoding: BinaryToTextEncoding,
|
|
1551
|
+
): DiffieHellman;
|
|
1486
1552
|
/**
|
|
1487
1553
|
* The `DiffieHellman` class is a utility for creating Diffie-Hellman key
|
|
1488
1554
|
* exchanges.
|
|
@@ -1516,10 +1582,15 @@ declare module 'crypto' {
|
|
|
1516
1582
|
class DiffieHellman {
|
|
1517
1583
|
private constructor();
|
|
1518
1584
|
/**
|
|
1519
|
-
* Generates private and public Diffie-Hellman key values
|
|
1585
|
+
* Generates private and public Diffie-Hellman key values unless they have been
|
|
1586
|
+
* generated or computed already, and returns
|
|
1520
1587
|
* the public key in the specified `encoding`. This key should be
|
|
1521
1588
|
* transferred to the other party.
|
|
1522
1589
|
* If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
|
|
1590
|
+
*
|
|
1591
|
+
* This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular,
|
|
1592
|
+
* once a private key has been generated or set, calling this function only updates
|
|
1593
|
+
* the public key but does not generate a new private key.
|
|
1523
1594
|
* @since v0.5.0
|
|
1524
1595
|
* @param encoding The `encoding` of the return value.
|
|
1525
1596
|
*/
|
|
@@ -1540,8 +1611,16 @@ declare module 'crypto' {
|
|
|
1540
1611
|
*/
|
|
1541
1612
|
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer;
|
|
1542
1613
|
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
|
|
1543
|
-
computeSecret(
|
|
1544
|
-
|
|
1614
|
+
computeSecret(
|
|
1615
|
+
otherPublicKey: NodeJS.ArrayBufferView,
|
|
1616
|
+
inputEncoding: null,
|
|
1617
|
+
outputEncoding: BinaryToTextEncoding,
|
|
1618
|
+
): string;
|
|
1619
|
+
computeSecret(
|
|
1620
|
+
otherPublicKey: string,
|
|
1621
|
+
inputEncoding: BinaryToTextEncoding,
|
|
1622
|
+
outputEncoding: BinaryToTextEncoding,
|
|
1623
|
+
): string;
|
|
1545
1624
|
/**
|
|
1546
1625
|
* Returns the Diffie-Hellman prime in the specified `encoding`.
|
|
1547
1626
|
* If `encoding` is provided a string is
|
|
@@ -1591,6 +1670,9 @@ declare module 'crypto' {
|
|
|
1591
1670
|
* Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
|
|
1592
1671
|
* to be a string. If no `encoding` is provided, `privateKey` is expected
|
|
1593
1672
|
* to be a `Buffer`, `TypedArray`, or `DataView`.
|
|
1673
|
+
*
|
|
1674
|
+
* This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be
|
|
1675
|
+
* used to manually provide the public key or to automatically derive it.
|
|
1594
1676
|
* @since v0.5.0
|
|
1595
1677
|
* @param encoding The `encoding` of the `privateKey` string.
|
|
1596
1678
|
*/
|
|
@@ -1635,11 +1717,11 @@ declare module 'crypto' {
|
|
|
1635
1717
|
*/
|
|
1636
1718
|
const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
|
|
1637
1719
|
interface DiffieHellmanGroupConstructor {
|
|
1638
|
-
new
|
|
1720
|
+
new(name: string): DiffieHellmanGroup;
|
|
1639
1721
|
(name: string): DiffieHellmanGroup;
|
|
1640
1722
|
readonly prototype: DiffieHellmanGroup;
|
|
1641
1723
|
}
|
|
1642
|
-
type DiffieHellmanGroup = Omit<DiffieHellman,
|
|
1724
|
+
type DiffieHellmanGroup = Omit<DiffieHellman, "setPublicKey" | "setPrivateKey">;
|
|
1643
1725
|
/**
|
|
1644
1726
|
* Creates a predefined `DiffieHellmanGroup` key exchange object. The
|
|
1645
1727
|
* supported groups are listed in the documentation for `DiffieHellmanGroup`.
|
|
@@ -1711,7 +1793,14 @@ declare module 'crypto' {
|
|
|
1711
1793
|
* negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
|
|
1712
1794
|
* @since v0.5.5
|
|
1713
1795
|
*/
|
|
1714
|
-
function pbkdf2(
|
|
1796
|
+
function pbkdf2(
|
|
1797
|
+
password: BinaryLike,
|
|
1798
|
+
salt: BinaryLike,
|
|
1799
|
+
iterations: number,
|
|
1800
|
+
keylen: number,
|
|
1801
|
+
digest: string,
|
|
1802
|
+
callback: (err: Error | null, derivedKey: Buffer) => void,
|
|
1803
|
+
): void;
|
|
1715
1804
|
/**
|
|
1716
1805
|
* Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
|
|
1717
1806
|
* implementation. A selected HMAC digest algorithm specified by `digest` is
|
|
@@ -1741,7 +1830,13 @@ declare module 'crypto' {
|
|
|
1741
1830
|
* An array of supported digest functions can be retrieved using {@link getHashes}.
|
|
1742
1831
|
* @since v0.9.3
|
|
1743
1832
|
*/
|
|
1744
|
-
function pbkdf2Sync(
|
|
1833
|
+
function pbkdf2Sync(
|
|
1834
|
+
password: BinaryLike,
|
|
1835
|
+
salt: BinaryLike,
|
|
1836
|
+
iterations: number,
|
|
1837
|
+
keylen: number,
|
|
1838
|
+
digest: string,
|
|
1839
|
+
): Buffer;
|
|
1745
1840
|
/**
|
|
1746
1841
|
* Generates cryptographically strong pseudorandom data. The `size` argument
|
|
1747
1842
|
* is a number indicating the number of bytes to generate.
|
|
@@ -1965,9 +2060,21 @@ declare module 'crypto' {
|
|
|
1965
2060
|
* @param [size=buffer.length - offset]
|
|
1966
2061
|
* @param callback `function(err, buf) {}`.
|
|
1967
2062
|
*/
|
|
1968
|
-
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
1969
|
-
|
|
1970
|
-
|
|
2063
|
+
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
2064
|
+
buffer: T,
|
|
2065
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2066
|
+
): void;
|
|
2067
|
+
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
2068
|
+
buffer: T,
|
|
2069
|
+
offset: number,
|
|
2070
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2071
|
+
): void;
|
|
2072
|
+
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
2073
|
+
buffer: T,
|
|
2074
|
+
offset: number,
|
|
2075
|
+
size: number,
|
|
2076
|
+
callback: (err: Error | null, buf: T) => void,
|
|
2077
|
+
): void;
|
|
1971
2078
|
interface ScryptOptions {
|
|
1972
2079
|
cost?: number | undefined;
|
|
1973
2080
|
blockSize?: number | undefined;
|
|
@@ -2011,8 +2118,19 @@ declare module 'crypto' {
|
|
|
2011
2118
|
* ```
|
|
2012
2119
|
* @since v10.5.0
|
|
2013
2120
|
*/
|
|
2014
|
-
function scrypt(
|
|
2015
|
-
|
|
2121
|
+
function scrypt(
|
|
2122
|
+
password: BinaryLike,
|
|
2123
|
+
salt: BinaryLike,
|
|
2124
|
+
keylen: number,
|
|
2125
|
+
callback: (err: Error | null, derivedKey: Buffer) => void,
|
|
2126
|
+
): void;
|
|
2127
|
+
function scrypt(
|
|
2128
|
+
password: BinaryLike,
|
|
2129
|
+
salt: BinaryLike,
|
|
2130
|
+
keylen: number,
|
|
2131
|
+
options: ScryptOptions,
|
|
2132
|
+
callback: (err: Error | null, derivedKey: Buffer) => void,
|
|
2133
|
+
): void;
|
|
2016
2134
|
/**
|
|
2017
2135
|
* Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
|
|
2018
2136
|
* key derivation function that is designed to be expensive computationally and
|
|
@@ -2226,8 +2344,8 @@ declare module 'crypto' {
|
|
|
2226
2344
|
key: BinaryLike,
|
|
2227
2345
|
curve: string,
|
|
2228
2346
|
inputEncoding?: BinaryToTextEncoding,
|
|
2229
|
-
outputEncoding?:
|
|
2230
|
-
format?:
|
|
2347
|
+
outputEncoding?: "latin1" | "hex" | "base64" | "base64url",
|
|
2348
|
+
format?: "uncompressed" | "compressed" | "hybrid",
|
|
2231
2349
|
): Buffer | string;
|
|
2232
2350
|
/**
|
|
2233
2351
|
* Generates private and public EC Diffie-Hellman key values, and returns
|
|
@@ -2263,7 +2381,11 @@ declare module 'crypto' {
|
|
|
2263
2381
|
computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
|
|
2264
2382
|
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
|
|
2265
2383
|
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
|
|
2266
|
-
computeSecret(
|
|
2384
|
+
computeSecret(
|
|
2385
|
+
otherPublicKey: string,
|
|
2386
|
+
inputEncoding: BinaryToTextEncoding,
|
|
2387
|
+
outputEncoding: BinaryToTextEncoding,
|
|
2388
|
+
): string;
|
|
2267
2389
|
/**
|
|
2268
2390
|
* If `encoding` is specified, a string is returned; otherwise a `Buffer` is
|
|
2269
2391
|
* returned.
|
|
@@ -2333,8 +2455,8 @@ declare module 'crypto' {
|
|
|
2333
2455
|
* @since v6.6.0
|
|
2334
2456
|
*/
|
|
2335
2457
|
function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
|
|
2336
|
-
type KeyType =
|
|
2337
|
-
type KeyFormat =
|
|
2458
|
+
type KeyType = "rsa" | "rsa-pss" | "dsa" | "ec" | "ed25519" | "ed448" | "x25519" | "x448";
|
|
2459
|
+
type KeyFormat = "pem" | "der" | "jwk";
|
|
2338
2460
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
2339
2461
|
format: T;
|
|
2340
2462
|
cipher?: string | undefined;
|
|
@@ -2409,11 +2531,11 @@ declare module 'crypto' {
|
|
|
2409
2531
|
*/
|
|
2410
2532
|
publicExponent?: number | undefined;
|
|
2411
2533
|
publicKeyEncoding: {
|
|
2412
|
-
type:
|
|
2534
|
+
type: "pkcs1" | "spki";
|
|
2413
2535
|
format: PubF;
|
|
2414
2536
|
};
|
|
2415
2537
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2416
|
-
type:
|
|
2538
|
+
type: "pkcs1" | "pkcs8";
|
|
2417
2539
|
};
|
|
2418
2540
|
}
|
|
2419
2541
|
interface RSAPSSKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
@@ -2439,11 +2561,11 @@ declare module 'crypto' {
|
|
|
2439
2561
|
*/
|
|
2440
2562
|
saltLength?: string;
|
|
2441
2563
|
publicKeyEncoding: {
|
|
2442
|
-
type:
|
|
2564
|
+
type: "spki";
|
|
2443
2565
|
format: PubF;
|
|
2444
2566
|
};
|
|
2445
2567
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2446
|
-
type:
|
|
2568
|
+
type: "pkcs8";
|
|
2447
2569
|
};
|
|
2448
2570
|
}
|
|
2449
2571
|
interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
@@ -2456,11 +2578,11 @@ declare module 'crypto' {
|
|
|
2456
2578
|
*/
|
|
2457
2579
|
divisorLength: number;
|
|
2458
2580
|
publicKeyEncoding: {
|
|
2459
|
-
type:
|
|
2581
|
+
type: "spki";
|
|
2460
2582
|
format: PubF;
|
|
2461
2583
|
};
|
|
2462
2584
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2463
|
-
type:
|
|
2585
|
+
type: "pkcs8";
|
|
2464
2586
|
};
|
|
2465
2587
|
}
|
|
2466
2588
|
interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
@@ -2469,47 +2591,47 @@ declare module 'crypto' {
|
|
|
2469
2591
|
*/
|
|
2470
2592
|
namedCurve: string;
|
|
2471
2593
|
publicKeyEncoding: {
|
|
2472
|
-
type:
|
|
2594
|
+
type: "pkcs1" | "spki";
|
|
2473
2595
|
format: PubF;
|
|
2474
2596
|
};
|
|
2475
2597
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2476
|
-
type:
|
|
2598
|
+
type: "sec1" | "pkcs8";
|
|
2477
2599
|
};
|
|
2478
2600
|
}
|
|
2479
2601
|
interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2480
2602
|
publicKeyEncoding: {
|
|
2481
|
-
type:
|
|
2603
|
+
type: "spki";
|
|
2482
2604
|
format: PubF;
|
|
2483
2605
|
};
|
|
2484
2606
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2485
|
-
type:
|
|
2607
|
+
type: "pkcs8";
|
|
2486
2608
|
};
|
|
2487
2609
|
}
|
|
2488
2610
|
interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2489
2611
|
publicKeyEncoding: {
|
|
2490
|
-
type:
|
|
2612
|
+
type: "spki";
|
|
2491
2613
|
format: PubF;
|
|
2492
2614
|
};
|
|
2493
2615
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2494
|
-
type:
|
|
2616
|
+
type: "pkcs8";
|
|
2495
2617
|
};
|
|
2496
2618
|
}
|
|
2497
2619
|
interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2498
2620
|
publicKeyEncoding: {
|
|
2499
|
-
type:
|
|
2621
|
+
type: "spki";
|
|
2500
2622
|
format: PubF;
|
|
2501
2623
|
};
|
|
2502
2624
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2503
|
-
type:
|
|
2625
|
+
type: "pkcs8";
|
|
2504
2626
|
};
|
|
2505
2627
|
}
|
|
2506
2628
|
interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2507
2629
|
publicKeyEncoding: {
|
|
2508
|
-
type:
|
|
2630
|
+
type: "spki";
|
|
2509
2631
|
format: PubF;
|
|
2510
2632
|
};
|
|
2511
2633
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2512
|
-
type:
|
|
2634
|
+
type: "pkcs8";
|
|
2513
2635
|
};
|
|
2514
2636
|
}
|
|
2515
2637
|
interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
|
|
@@ -2557,46 +2679,142 @@ declare module 'crypto' {
|
|
|
2557
2679
|
* @since v10.12.0
|
|
2558
2680
|
* @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
|
|
2559
2681
|
*/
|
|
2560
|
-
function generateKeyPairSync(
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
function generateKeyPairSync(
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
function generateKeyPairSync(
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
function generateKeyPairSync(
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
function generateKeyPairSync(type:
|
|
2577
|
-
function generateKeyPairSync(
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
function generateKeyPairSync(
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
function generateKeyPairSync(
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
function generateKeyPairSync(
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
function generateKeyPairSync(type:
|
|
2594
|
-
function generateKeyPairSync(
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
function generateKeyPairSync(
|
|
2599
|
-
|
|
2682
|
+
function generateKeyPairSync(
|
|
2683
|
+
type: "rsa",
|
|
2684
|
+
options: RSAKeyPairOptions<"pem", "pem">,
|
|
2685
|
+
): KeyPairSyncResult<string, string>;
|
|
2686
|
+
function generateKeyPairSync(
|
|
2687
|
+
type: "rsa",
|
|
2688
|
+
options: RSAKeyPairOptions<"pem", "der">,
|
|
2689
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
2690
|
+
function generateKeyPairSync(
|
|
2691
|
+
type: "rsa",
|
|
2692
|
+
options: RSAKeyPairOptions<"der", "pem">,
|
|
2693
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
2694
|
+
function generateKeyPairSync(
|
|
2695
|
+
type: "rsa",
|
|
2696
|
+
options: RSAKeyPairOptions<"der", "der">,
|
|
2697
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2698
|
+
function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2699
|
+
function generateKeyPairSync(
|
|
2700
|
+
type: "rsa-pss",
|
|
2701
|
+
options: RSAPSSKeyPairOptions<"pem", "pem">,
|
|
2702
|
+
): KeyPairSyncResult<string, string>;
|
|
2703
|
+
function generateKeyPairSync(
|
|
2704
|
+
type: "rsa-pss",
|
|
2705
|
+
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2706
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
2707
|
+
function generateKeyPairSync(
|
|
2708
|
+
type: "rsa-pss",
|
|
2709
|
+
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2710
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
2711
|
+
function generateKeyPairSync(
|
|
2712
|
+
type: "rsa-pss",
|
|
2713
|
+
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2714
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2715
|
+
function generateKeyPairSync(type: "rsa-pss", options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2716
|
+
function generateKeyPairSync(
|
|
2717
|
+
type: "dsa",
|
|
2718
|
+
options: DSAKeyPairOptions<"pem", "pem">,
|
|
2719
|
+
): KeyPairSyncResult<string, string>;
|
|
2720
|
+
function generateKeyPairSync(
|
|
2721
|
+
type: "dsa",
|
|
2722
|
+
options: DSAKeyPairOptions<"pem", "der">,
|
|
2723
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
2724
|
+
function generateKeyPairSync(
|
|
2725
|
+
type: "dsa",
|
|
2726
|
+
options: DSAKeyPairOptions<"der", "pem">,
|
|
2727
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
2728
|
+
function generateKeyPairSync(
|
|
2729
|
+
type: "dsa",
|
|
2730
|
+
options: DSAKeyPairOptions<"der", "der">,
|
|
2731
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2732
|
+
function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2733
|
+
function generateKeyPairSync(
|
|
2734
|
+
type: "ec",
|
|
2735
|
+
options: ECKeyPairOptions<"pem", "pem">,
|
|
2736
|
+
): KeyPairSyncResult<string, string>;
|
|
2737
|
+
function generateKeyPairSync(
|
|
2738
|
+
type: "ec",
|
|
2739
|
+
options: ECKeyPairOptions<"pem", "der">,
|
|
2740
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
2741
|
+
function generateKeyPairSync(
|
|
2742
|
+
type: "ec",
|
|
2743
|
+
options: ECKeyPairOptions<"der", "pem">,
|
|
2744
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
2745
|
+
function generateKeyPairSync(
|
|
2746
|
+
type: "ec",
|
|
2747
|
+
options: ECKeyPairOptions<"der", "der">,
|
|
2748
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2749
|
+
function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2750
|
+
function generateKeyPairSync(
|
|
2751
|
+
type: "ed25519",
|
|
2752
|
+
options: ED25519KeyPairOptions<"pem", "pem">,
|
|
2753
|
+
): KeyPairSyncResult<string, string>;
|
|
2754
|
+
function generateKeyPairSync(
|
|
2755
|
+
type: "ed25519",
|
|
2756
|
+
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2757
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
2758
|
+
function generateKeyPairSync(
|
|
2759
|
+
type: "ed25519",
|
|
2760
|
+
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2761
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
2762
|
+
function generateKeyPairSync(
|
|
2763
|
+
type: "ed25519",
|
|
2764
|
+
options: ED25519KeyPairOptions<"der", "der">,
|
|
2765
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2766
|
+
function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2767
|
+
function generateKeyPairSync(
|
|
2768
|
+
type: "ed448",
|
|
2769
|
+
options: ED448KeyPairOptions<"pem", "pem">,
|
|
2770
|
+
): KeyPairSyncResult<string, string>;
|
|
2771
|
+
function generateKeyPairSync(
|
|
2772
|
+
type: "ed448",
|
|
2773
|
+
options: ED448KeyPairOptions<"pem", "der">,
|
|
2774
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
2775
|
+
function generateKeyPairSync(
|
|
2776
|
+
type: "ed448",
|
|
2777
|
+
options: ED448KeyPairOptions<"der", "pem">,
|
|
2778
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
2779
|
+
function generateKeyPairSync(
|
|
2780
|
+
type: "ed448",
|
|
2781
|
+
options: ED448KeyPairOptions<"der", "der">,
|
|
2782
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2783
|
+
function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2784
|
+
function generateKeyPairSync(
|
|
2785
|
+
type: "x25519",
|
|
2786
|
+
options: X25519KeyPairOptions<"pem", "pem">,
|
|
2787
|
+
): KeyPairSyncResult<string, string>;
|
|
2788
|
+
function generateKeyPairSync(
|
|
2789
|
+
type: "x25519",
|
|
2790
|
+
options: X25519KeyPairOptions<"pem", "der">,
|
|
2791
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
2792
|
+
function generateKeyPairSync(
|
|
2793
|
+
type: "x25519",
|
|
2794
|
+
options: X25519KeyPairOptions<"der", "pem">,
|
|
2795
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
2796
|
+
function generateKeyPairSync(
|
|
2797
|
+
type: "x25519",
|
|
2798
|
+
options: X25519KeyPairOptions<"der", "der">,
|
|
2799
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2800
|
+
function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2801
|
+
function generateKeyPairSync(
|
|
2802
|
+
type: "x448",
|
|
2803
|
+
options: X448KeyPairOptions<"pem", "pem">,
|
|
2804
|
+
): KeyPairSyncResult<string, string>;
|
|
2805
|
+
function generateKeyPairSync(
|
|
2806
|
+
type: "x448",
|
|
2807
|
+
options: X448KeyPairOptions<"pem", "der">,
|
|
2808
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
2809
|
+
function generateKeyPairSync(
|
|
2810
|
+
type: "x448",
|
|
2811
|
+
options: X448KeyPairOptions<"der", "pem">,
|
|
2812
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
2813
|
+
function generateKeyPairSync(
|
|
2814
|
+
type: "x448",
|
|
2815
|
+
options: X448KeyPairOptions<"der", "der">,
|
|
2816
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
2817
|
+
function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2600
2818
|
/**
|
|
2601
2819
|
* Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
|
|
2602
2820
|
* Ed25519, Ed448, X25519, X448, and DH are currently supported.
|
|
@@ -2636,279 +2854,448 @@ declare module 'crypto' {
|
|
|
2636
2854
|
* @since v10.12.0
|
|
2637
2855
|
* @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
|
|
2638
2856
|
*/
|
|
2639
|
-
function generateKeyPair(
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
function generateKeyPair(
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
function generateKeyPair(
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
function generateKeyPair(
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
function generateKeyPair(
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
function generateKeyPair(
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
function generateKeyPair(
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
function generateKeyPair(
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2857
|
+
function generateKeyPair(
|
|
2858
|
+
type: "rsa",
|
|
2859
|
+
options: RSAKeyPairOptions<"pem", "pem">,
|
|
2860
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2861
|
+
): void;
|
|
2862
|
+
function generateKeyPair(
|
|
2863
|
+
type: "rsa",
|
|
2864
|
+
options: RSAKeyPairOptions<"pem", "der">,
|
|
2865
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
2866
|
+
): void;
|
|
2867
|
+
function generateKeyPair(
|
|
2868
|
+
type: "rsa",
|
|
2869
|
+
options: RSAKeyPairOptions<"der", "pem">,
|
|
2870
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
2871
|
+
): void;
|
|
2872
|
+
function generateKeyPair(
|
|
2873
|
+
type: "rsa",
|
|
2874
|
+
options: RSAKeyPairOptions<"der", "der">,
|
|
2875
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
2876
|
+
): void;
|
|
2877
|
+
function generateKeyPair(
|
|
2878
|
+
type: "rsa",
|
|
2879
|
+
options: RSAKeyPairKeyObjectOptions,
|
|
2880
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2881
|
+
): void;
|
|
2882
|
+
function generateKeyPair(
|
|
2883
|
+
type: "rsa-pss",
|
|
2884
|
+
options: RSAPSSKeyPairOptions<"pem", "pem">,
|
|
2885
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2886
|
+
): void;
|
|
2887
|
+
function generateKeyPair(
|
|
2888
|
+
type: "rsa-pss",
|
|
2889
|
+
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2890
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
2891
|
+
): void;
|
|
2892
|
+
function generateKeyPair(
|
|
2893
|
+
type: "rsa-pss",
|
|
2894
|
+
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2895
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
2896
|
+
): void;
|
|
2897
|
+
function generateKeyPair(
|
|
2898
|
+
type: "rsa-pss",
|
|
2899
|
+
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2900
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
2901
|
+
): void;
|
|
2902
|
+
function generateKeyPair(
|
|
2903
|
+
type: "rsa-pss",
|
|
2904
|
+
options: RSAPSSKeyPairKeyObjectOptions,
|
|
2905
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2906
|
+
): void;
|
|
2907
|
+
function generateKeyPair(
|
|
2908
|
+
type: "dsa",
|
|
2909
|
+
options: DSAKeyPairOptions<"pem", "pem">,
|
|
2910
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2911
|
+
): void;
|
|
2912
|
+
function generateKeyPair(
|
|
2913
|
+
type: "dsa",
|
|
2914
|
+
options: DSAKeyPairOptions<"pem", "der">,
|
|
2915
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
2916
|
+
): void;
|
|
2917
|
+
function generateKeyPair(
|
|
2918
|
+
type: "dsa",
|
|
2919
|
+
options: DSAKeyPairOptions<"der", "pem">,
|
|
2920
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
2921
|
+
): void;
|
|
2922
|
+
function generateKeyPair(
|
|
2923
|
+
type: "dsa",
|
|
2924
|
+
options: DSAKeyPairOptions<"der", "der">,
|
|
2925
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
2926
|
+
): void;
|
|
2927
|
+
function generateKeyPair(
|
|
2928
|
+
type: "dsa",
|
|
2929
|
+
options: DSAKeyPairKeyObjectOptions,
|
|
2930
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2931
|
+
): void;
|
|
2932
|
+
function generateKeyPair(
|
|
2933
|
+
type: "ec",
|
|
2934
|
+
options: ECKeyPairOptions<"pem", "pem">,
|
|
2935
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2936
|
+
): void;
|
|
2937
|
+
function generateKeyPair(
|
|
2938
|
+
type: "ec",
|
|
2939
|
+
options: ECKeyPairOptions<"pem", "der">,
|
|
2940
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
2941
|
+
): void;
|
|
2942
|
+
function generateKeyPair(
|
|
2943
|
+
type: "ec",
|
|
2944
|
+
options: ECKeyPairOptions<"der", "pem">,
|
|
2945
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
2946
|
+
): void;
|
|
2947
|
+
function generateKeyPair(
|
|
2948
|
+
type: "ec",
|
|
2949
|
+
options: ECKeyPairOptions<"der", "der">,
|
|
2950
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
2951
|
+
): void;
|
|
2952
|
+
function generateKeyPair(
|
|
2953
|
+
type: "ec",
|
|
2954
|
+
options: ECKeyPairKeyObjectOptions,
|
|
2955
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2956
|
+
): void;
|
|
2957
|
+
function generateKeyPair(
|
|
2958
|
+
type: "ed25519",
|
|
2959
|
+
options: ED25519KeyPairOptions<"pem", "pem">,
|
|
2960
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2961
|
+
): void;
|
|
2962
|
+
function generateKeyPair(
|
|
2963
|
+
type: "ed25519",
|
|
2964
|
+
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2965
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
2966
|
+
): void;
|
|
2967
|
+
function generateKeyPair(
|
|
2968
|
+
type: "ed25519",
|
|
2969
|
+
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2970
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
2971
|
+
): void;
|
|
2972
|
+
function generateKeyPair(
|
|
2973
|
+
type: "ed25519",
|
|
2974
|
+
options: ED25519KeyPairOptions<"der", "der">,
|
|
2975
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
2976
|
+
): void;
|
|
2977
|
+
function generateKeyPair(
|
|
2978
|
+
type: "ed25519",
|
|
2979
|
+
options: ED25519KeyPairKeyObjectOptions | undefined,
|
|
2980
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
2981
|
+
): void;
|
|
2982
|
+
function generateKeyPair(
|
|
2983
|
+
type: "ed448",
|
|
2984
|
+
options: ED448KeyPairOptions<"pem", "pem">,
|
|
2985
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
2986
|
+
): void;
|
|
2987
|
+
function generateKeyPair(
|
|
2988
|
+
type: "ed448",
|
|
2989
|
+
options: ED448KeyPairOptions<"pem", "der">,
|
|
2990
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
2991
|
+
): void;
|
|
2992
|
+
function generateKeyPair(
|
|
2993
|
+
type: "ed448",
|
|
2994
|
+
options: ED448KeyPairOptions<"der", "pem">,
|
|
2995
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
2996
|
+
): void;
|
|
2997
|
+
function generateKeyPair(
|
|
2998
|
+
type: "ed448",
|
|
2999
|
+
options: ED448KeyPairOptions<"der", "der">,
|
|
3000
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
3001
|
+
): void;
|
|
3002
|
+
function generateKeyPair(
|
|
3003
|
+
type: "ed448",
|
|
3004
|
+
options: ED448KeyPairKeyObjectOptions | undefined,
|
|
3005
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
3006
|
+
): void;
|
|
3007
|
+
function generateKeyPair(
|
|
3008
|
+
type: "x25519",
|
|
3009
|
+
options: X25519KeyPairOptions<"pem", "pem">,
|
|
3010
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
3011
|
+
): void;
|
|
3012
|
+
function generateKeyPair(
|
|
3013
|
+
type: "x25519",
|
|
3014
|
+
options: X25519KeyPairOptions<"pem", "der">,
|
|
3015
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
3016
|
+
): void;
|
|
3017
|
+
function generateKeyPair(
|
|
3018
|
+
type: "x25519",
|
|
3019
|
+
options: X25519KeyPairOptions<"der", "pem">,
|
|
3020
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
3021
|
+
): void;
|
|
3022
|
+
function generateKeyPair(
|
|
3023
|
+
type: "x25519",
|
|
3024
|
+
options: X25519KeyPairOptions<"der", "der">,
|
|
3025
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
3026
|
+
): void;
|
|
3027
|
+
function generateKeyPair(
|
|
3028
|
+
type: "x25519",
|
|
3029
|
+
options: X25519KeyPairKeyObjectOptions | undefined,
|
|
3030
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
3031
|
+
): void;
|
|
3032
|
+
function generateKeyPair(
|
|
3033
|
+
type: "x448",
|
|
3034
|
+
options: X448KeyPairOptions<"pem", "pem">,
|
|
3035
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
3036
|
+
): void;
|
|
3037
|
+
function generateKeyPair(
|
|
3038
|
+
type: "x448",
|
|
3039
|
+
options: X448KeyPairOptions<"pem", "der">,
|
|
3040
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
3041
|
+
): void;
|
|
3042
|
+
function generateKeyPair(
|
|
3043
|
+
type: "x448",
|
|
3044
|
+
options: X448KeyPairOptions<"der", "pem">,
|
|
3045
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
3046
|
+
): void;
|
|
3047
|
+
function generateKeyPair(
|
|
3048
|
+
type: "x448",
|
|
3049
|
+
options: X448KeyPairOptions<"der", "der">,
|
|
3050
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
3051
|
+
): void;
|
|
3052
|
+
function generateKeyPair(
|
|
3053
|
+
type: "x448",
|
|
3054
|
+
options: X448KeyPairKeyObjectOptions | undefined,
|
|
3055
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
3056
|
+
): void;
|
|
2679
3057
|
namespace generateKeyPair {
|
|
2680
3058
|
function __promisify__(
|
|
2681
|
-
type:
|
|
2682
|
-
options: RSAKeyPairOptions<
|
|
3059
|
+
type: "rsa",
|
|
3060
|
+
options: RSAKeyPairOptions<"pem", "pem">,
|
|
2683
3061
|
): Promise<{
|
|
2684
3062
|
publicKey: string;
|
|
2685
3063
|
privateKey: string;
|
|
2686
3064
|
}>;
|
|
2687
3065
|
function __promisify__(
|
|
2688
|
-
type:
|
|
2689
|
-
options: RSAKeyPairOptions<
|
|
3066
|
+
type: "rsa",
|
|
3067
|
+
options: RSAKeyPairOptions<"pem", "der">,
|
|
2690
3068
|
): Promise<{
|
|
2691
3069
|
publicKey: string;
|
|
2692
3070
|
privateKey: Buffer;
|
|
2693
3071
|
}>;
|
|
2694
3072
|
function __promisify__(
|
|
2695
|
-
type:
|
|
2696
|
-
options: RSAKeyPairOptions<
|
|
3073
|
+
type: "rsa",
|
|
3074
|
+
options: RSAKeyPairOptions<"der", "pem">,
|
|
2697
3075
|
): Promise<{
|
|
2698
3076
|
publicKey: Buffer;
|
|
2699
3077
|
privateKey: string;
|
|
2700
3078
|
}>;
|
|
2701
3079
|
function __promisify__(
|
|
2702
|
-
type:
|
|
2703
|
-
options: RSAKeyPairOptions<
|
|
3080
|
+
type: "rsa",
|
|
3081
|
+
options: RSAKeyPairOptions<"der", "der">,
|
|
2704
3082
|
): Promise<{
|
|
2705
3083
|
publicKey: Buffer;
|
|
2706
3084
|
privateKey: Buffer;
|
|
2707
3085
|
}>;
|
|
2708
|
-
function __promisify__(type:
|
|
3086
|
+
function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2709
3087
|
function __promisify__(
|
|
2710
|
-
type:
|
|
2711
|
-
options: RSAPSSKeyPairOptions<
|
|
3088
|
+
type: "rsa-pss",
|
|
3089
|
+
options: RSAPSSKeyPairOptions<"pem", "pem">,
|
|
2712
3090
|
): Promise<{
|
|
2713
3091
|
publicKey: string;
|
|
2714
3092
|
privateKey: string;
|
|
2715
3093
|
}>;
|
|
2716
3094
|
function __promisify__(
|
|
2717
|
-
type:
|
|
2718
|
-
options: RSAPSSKeyPairOptions<
|
|
3095
|
+
type: "rsa-pss",
|
|
3096
|
+
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2719
3097
|
): Promise<{
|
|
2720
3098
|
publicKey: string;
|
|
2721
3099
|
privateKey: Buffer;
|
|
2722
3100
|
}>;
|
|
2723
3101
|
function __promisify__(
|
|
2724
|
-
type:
|
|
2725
|
-
options: RSAPSSKeyPairOptions<
|
|
3102
|
+
type: "rsa-pss",
|
|
3103
|
+
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2726
3104
|
): Promise<{
|
|
2727
3105
|
publicKey: Buffer;
|
|
2728
3106
|
privateKey: string;
|
|
2729
3107
|
}>;
|
|
2730
3108
|
function __promisify__(
|
|
2731
|
-
type:
|
|
2732
|
-
options: RSAPSSKeyPairOptions<
|
|
3109
|
+
type: "rsa-pss",
|
|
3110
|
+
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2733
3111
|
): Promise<{
|
|
2734
3112
|
publicKey: Buffer;
|
|
2735
3113
|
privateKey: Buffer;
|
|
2736
3114
|
}>;
|
|
2737
|
-
function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2738
3115
|
function __promisify__(
|
|
2739
|
-
type:
|
|
2740
|
-
options:
|
|
3116
|
+
type: "rsa-pss",
|
|
3117
|
+
options: RSAPSSKeyPairKeyObjectOptions,
|
|
3118
|
+
): Promise<KeyPairKeyObjectResult>;
|
|
3119
|
+
function __promisify__(
|
|
3120
|
+
type: "dsa",
|
|
3121
|
+
options: DSAKeyPairOptions<"pem", "pem">,
|
|
2741
3122
|
): Promise<{
|
|
2742
3123
|
publicKey: string;
|
|
2743
3124
|
privateKey: string;
|
|
2744
3125
|
}>;
|
|
2745
3126
|
function __promisify__(
|
|
2746
|
-
type:
|
|
2747
|
-
options: DSAKeyPairOptions<
|
|
3127
|
+
type: "dsa",
|
|
3128
|
+
options: DSAKeyPairOptions<"pem", "der">,
|
|
2748
3129
|
): Promise<{
|
|
2749
3130
|
publicKey: string;
|
|
2750
3131
|
privateKey: Buffer;
|
|
2751
3132
|
}>;
|
|
2752
3133
|
function __promisify__(
|
|
2753
|
-
type:
|
|
2754
|
-
options: DSAKeyPairOptions<
|
|
3134
|
+
type: "dsa",
|
|
3135
|
+
options: DSAKeyPairOptions<"der", "pem">,
|
|
2755
3136
|
): Promise<{
|
|
2756
3137
|
publicKey: Buffer;
|
|
2757
3138
|
privateKey: string;
|
|
2758
3139
|
}>;
|
|
2759
3140
|
function __promisify__(
|
|
2760
|
-
type:
|
|
2761
|
-
options: DSAKeyPairOptions<
|
|
3141
|
+
type: "dsa",
|
|
3142
|
+
options: DSAKeyPairOptions<"der", "der">,
|
|
2762
3143
|
): Promise<{
|
|
2763
3144
|
publicKey: Buffer;
|
|
2764
3145
|
privateKey: Buffer;
|
|
2765
3146
|
}>;
|
|
2766
|
-
function __promisify__(type:
|
|
3147
|
+
function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2767
3148
|
function __promisify__(
|
|
2768
|
-
type:
|
|
2769
|
-
options: ECKeyPairOptions<
|
|
3149
|
+
type: "ec",
|
|
3150
|
+
options: ECKeyPairOptions<"pem", "pem">,
|
|
2770
3151
|
): Promise<{
|
|
2771
3152
|
publicKey: string;
|
|
2772
3153
|
privateKey: string;
|
|
2773
3154
|
}>;
|
|
2774
3155
|
function __promisify__(
|
|
2775
|
-
type:
|
|
2776
|
-
options: ECKeyPairOptions<
|
|
3156
|
+
type: "ec",
|
|
3157
|
+
options: ECKeyPairOptions<"pem", "der">,
|
|
2777
3158
|
): Promise<{
|
|
2778
3159
|
publicKey: string;
|
|
2779
3160
|
privateKey: Buffer;
|
|
2780
3161
|
}>;
|
|
2781
3162
|
function __promisify__(
|
|
2782
|
-
type:
|
|
2783
|
-
options: ECKeyPairOptions<
|
|
3163
|
+
type: "ec",
|
|
3164
|
+
options: ECKeyPairOptions<"der", "pem">,
|
|
2784
3165
|
): Promise<{
|
|
2785
3166
|
publicKey: Buffer;
|
|
2786
3167
|
privateKey: string;
|
|
2787
3168
|
}>;
|
|
2788
3169
|
function __promisify__(
|
|
2789
|
-
type:
|
|
2790
|
-
options: ECKeyPairOptions<
|
|
3170
|
+
type: "ec",
|
|
3171
|
+
options: ECKeyPairOptions<"der", "der">,
|
|
2791
3172
|
): Promise<{
|
|
2792
3173
|
publicKey: Buffer;
|
|
2793
3174
|
privateKey: Buffer;
|
|
2794
3175
|
}>;
|
|
2795
|
-
function __promisify__(type:
|
|
3176
|
+
function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2796
3177
|
function __promisify__(
|
|
2797
|
-
type:
|
|
2798
|
-
options: ED25519KeyPairOptions<
|
|
3178
|
+
type: "ed25519",
|
|
3179
|
+
options: ED25519KeyPairOptions<"pem", "pem">,
|
|
2799
3180
|
): Promise<{
|
|
2800
3181
|
publicKey: string;
|
|
2801
3182
|
privateKey: string;
|
|
2802
3183
|
}>;
|
|
2803
3184
|
function __promisify__(
|
|
2804
|
-
type:
|
|
2805
|
-
options: ED25519KeyPairOptions<
|
|
3185
|
+
type: "ed25519",
|
|
3186
|
+
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2806
3187
|
): Promise<{
|
|
2807
3188
|
publicKey: string;
|
|
2808
3189
|
privateKey: Buffer;
|
|
2809
3190
|
}>;
|
|
2810
3191
|
function __promisify__(
|
|
2811
|
-
type:
|
|
2812
|
-
options: ED25519KeyPairOptions<
|
|
3192
|
+
type: "ed25519",
|
|
3193
|
+
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2813
3194
|
): Promise<{
|
|
2814
3195
|
publicKey: Buffer;
|
|
2815
3196
|
privateKey: string;
|
|
2816
3197
|
}>;
|
|
2817
3198
|
function __promisify__(
|
|
2818
|
-
type:
|
|
2819
|
-
options: ED25519KeyPairOptions<
|
|
3199
|
+
type: "ed25519",
|
|
3200
|
+
options: ED25519KeyPairOptions<"der", "der">,
|
|
2820
3201
|
): Promise<{
|
|
2821
3202
|
publicKey: Buffer;
|
|
2822
3203
|
privateKey: Buffer;
|
|
2823
3204
|
}>;
|
|
2824
|
-
function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2825
3205
|
function __promisify__(
|
|
2826
|
-
type:
|
|
2827
|
-
options
|
|
3206
|
+
type: "ed25519",
|
|
3207
|
+
options?: ED25519KeyPairKeyObjectOptions,
|
|
3208
|
+
): Promise<KeyPairKeyObjectResult>;
|
|
3209
|
+
function __promisify__(
|
|
3210
|
+
type: "ed448",
|
|
3211
|
+
options: ED448KeyPairOptions<"pem", "pem">,
|
|
2828
3212
|
): Promise<{
|
|
2829
3213
|
publicKey: string;
|
|
2830
3214
|
privateKey: string;
|
|
2831
3215
|
}>;
|
|
2832
3216
|
function __promisify__(
|
|
2833
|
-
type:
|
|
2834
|
-
options: ED448KeyPairOptions<
|
|
3217
|
+
type: "ed448",
|
|
3218
|
+
options: ED448KeyPairOptions<"pem", "der">,
|
|
2835
3219
|
): Promise<{
|
|
2836
3220
|
publicKey: string;
|
|
2837
3221
|
privateKey: Buffer;
|
|
2838
3222
|
}>;
|
|
2839
3223
|
function __promisify__(
|
|
2840
|
-
type:
|
|
2841
|
-
options: ED448KeyPairOptions<
|
|
3224
|
+
type: "ed448",
|
|
3225
|
+
options: ED448KeyPairOptions<"der", "pem">,
|
|
2842
3226
|
): Promise<{
|
|
2843
3227
|
publicKey: Buffer;
|
|
2844
3228
|
privateKey: string;
|
|
2845
3229
|
}>;
|
|
2846
3230
|
function __promisify__(
|
|
2847
|
-
type:
|
|
2848
|
-
options: ED448KeyPairOptions<
|
|
3231
|
+
type: "ed448",
|
|
3232
|
+
options: ED448KeyPairOptions<"der", "der">,
|
|
2849
3233
|
): Promise<{
|
|
2850
3234
|
publicKey: Buffer;
|
|
2851
3235
|
privateKey: Buffer;
|
|
2852
3236
|
}>;
|
|
2853
|
-
function __promisify__(type:
|
|
3237
|
+
function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2854
3238
|
function __promisify__(
|
|
2855
|
-
type:
|
|
2856
|
-
options: X25519KeyPairOptions<
|
|
3239
|
+
type: "x25519",
|
|
3240
|
+
options: X25519KeyPairOptions<"pem", "pem">,
|
|
2857
3241
|
): Promise<{
|
|
2858
3242
|
publicKey: string;
|
|
2859
3243
|
privateKey: string;
|
|
2860
3244
|
}>;
|
|
2861
3245
|
function __promisify__(
|
|
2862
|
-
type:
|
|
2863
|
-
options: X25519KeyPairOptions<
|
|
3246
|
+
type: "x25519",
|
|
3247
|
+
options: X25519KeyPairOptions<"pem", "der">,
|
|
2864
3248
|
): Promise<{
|
|
2865
3249
|
publicKey: string;
|
|
2866
3250
|
privateKey: Buffer;
|
|
2867
3251
|
}>;
|
|
2868
3252
|
function __promisify__(
|
|
2869
|
-
type:
|
|
2870
|
-
options: X25519KeyPairOptions<
|
|
3253
|
+
type: "x25519",
|
|
3254
|
+
options: X25519KeyPairOptions<"der", "pem">,
|
|
2871
3255
|
): Promise<{
|
|
2872
3256
|
publicKey: Buffer;
|
|
2873
3257
|
privateKey: string;
|
|
2874
3258
|
}>;
|
|
2875
3259
|
function __promisify__(
|
|
2876
|
-
type:
|
|
2877
|
-
options: X25519KeyPairOptions<
|
|
3260
|
+
type: "x25519",
|
|
3261
|
+
options: X25519KeyPairOptions<"der", "der">,
|
|
2878
3262
|
): Promise<{
|
|
2879
3263
|
publicKey: Buffer;
|
|
2880
3264
|
privateKey: Buffer;
|
|
2881
3265
|
}>;
|
|
2882
|
-
function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2883
3266
|
function __promisify__(
|
|
2884
|
-
type:
|
|
2885
|
-
options
|
|
3267
|
+
type: "x25519",
|
|
3268
|
+
options?: X25519KeyPairKeyObjectOptions,
|
|
3269
|
+
): Promise<KeyPairKeyObjectResult>;
|
|
3270
|
+
function __promisify__(
|
|
3271
|
+
type: "x448",
|
|
3272
|
+
options: X448KeyPairOptions<"pem", "pem">,
|
|
2886
3273
|
): Promise<{
|
|
2887
3274
|
publicKey: string;
|
|
2888
3275
|
privateKey: string;
|
|
2889
3276
|
}>;
|
|
2890
3277
|
function __promisify__(
|
|
2891
|
-
type:
|
|
2892
|
-
options: X448KeyPairOptions<
|
|
3278
|
+
type: "x448",
|
|
3279
|
+
options: X448KeyPairOptions<"pem", "der">,
|
|
2893
3280
|
): Promise<{
|
|
2894
3281
|
publicKey: string;
|
|
2895
3282
|
privateKey: Buffer;
|
|
2896
3283
|
}>;
|
|
2897
3284
|
function __promisify__(
|
|
2898
|
-
type:
|
|
2899
|
-
options: X448KeyPairOptions<
|
|
3285
|
+
type: "x448",
|
|
3286
|
+
options: X448KeyPairOptions<"der", "pem">,
|
|
2900
3287
|
): Promise<{
|
|
2901
3288
|
publicKey: Buffer;
|
|
2902
3289
|
privateKey: string;
|
|
2903
3290
|
}>;
|
|
2904
3291
|
function __promisify__(
|
|
2905
|
-
type:
|
|
2906
|
-
options: X448KeyPairOptions<
|
|
3292
|
+
type: "x448",
|
|
3293
|
+
options: X448KeyPairOptions<"der", "der">,
|
|
2907
3294
|
): Promise<{
|
|
2908
3295
|
publicKey: Buffer;
|
|
2909
3296
|
privateKey: Buffer;
|
|
2910
3297
|
}>;
|
|
2911
|
-
function __promisify__(type:
|
|
3298
|
+
function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2912
3299
|
}
|
|
2913
3300
|
/**
|
|
2914
3301
|
* Calculates and returns the signature for `data` using the given private key and
|
|
@@ -2922,12 +3309,16 @@ declare module 'crypto' {
|
|
|
2922
3309
|
* If the `callback` function is provided this function uses libuv's threadpool.
|
|
2923
3310
|
* @since v12.0.0
|
|
2924
3311
|
*/
|
|
2925
|
-
function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
|
|
2926
3312
|
function sign(
|
|
2927
3313
|
algorithm: string | null | undefined,
|
|
2928
3314
|
data: NodeJS.ArrayBufferView,
|
|
2929
3315
|
key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
|
|
2930
|
-
|
|
3316
|
+
): Buffer;
|
|
3317
|
+
function sign(
|
|
3318
|
+
algorithm: string | null | undefined,
|
|
3319
|
+
data: NodeJS.ArrayBufferView,
|
|
3320
|
+
key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
|
|
3321
|
+
callback: (error: Error | null, data: Buffer) => void,
|
|
2931
3322
|
): void;
|
|
2932
3323
|
/**
|
|
2933
3324
|
* Verifies the given signature for `data` using the given key and algorithm. If`algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
|
|
@@ -2949,14 +3340,14 @@ declare module 'crypto' {
|
|
|
2949
3340
|
algorithm: string | null | undefined,
|
|
2950
3341
|
data: NodeJS.ArrayBufferView,
|
|
2951
3342
|
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
|
2952
|
-
signature: NodeJS.ArrayBufferView
|
|
3343
|
+
signature: NodeJS.ArrayBufferView,
|
|
2953
3344
|
): boolean;
|
|
2954
3345
|
function verify(
|
|
2955
3346
|
algorithm: string | null | undefined,
|
|
2956
3347
|
data: NodeJS.ArrayBufferView,
|
|
2957
3348
|
key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
|
|
2958
3349
|
signature: NodeJS.ArrayBufferView,
|
|
2959
|
-
callback: (error: Error | null, result: boolean) => void
|
|
3350
|
+
callback: (error: Error | null, result: boolean) => void,
|
|
2960
3351
|
): void;
|
|
2961
3352
|
/**
|
|
2962
3353
|
* Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
|
|
@@ -2964,7 +3355,7 @@ declare module 'crypto' {
|
|
|
2964
3355
|
* @since v13.9.0, v12.17.0
|
|
2965
3356
|
*/
|
|
2966
3357
|
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
|
|
2967
|
-
type CipherMode =
|
|
3358
|
+
type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
|
|
2968
3359
|
interface CipherInfoOptions {
|
|
2969
3360
|
/**
|
|
2970
3361
|
* A test key length.
|
|
@@ -3042,7 +3433,14 @@ declare module 'crypto' {
|
|
|
3042
3433
|
* @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
|
|
3043
3434
|
* generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
|
|
3044
3435
|
*/
|
|
3045
|
-
function hkdf(
|
|
3436
|
+
function hkdf(
|
|
3437
|
+
digest: string,
|
|
3438
|
+
irm: BinaryLike | KeyObject,
|
|
3439
|
+
salt: BinaryLike,
|
|
3440
|
+
info: BinaryLike,
|
|
3441
|
+
keylen: number,
|
|
3442
|
+
callback: (err: Error | null, derivedKey: ArrayBuffer) => void,
|
|
3443
|
+
): void;
|
|
3046
3444
|
/**
|
|
3047
3445
|
* Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
|
|
3048
3446
|
* given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
|
|
@@ -3069,7 +3467,13 @@ declare module 'crypto' {
|
|
|
3069
3467
|
* @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
|
|
3070
3468
|
* generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
|
|
3071
3469
|
*/
|
|
3072
|
-
function hkdfSync(
|
|
3470
|
+
function hkdfSync(
|
|
3471
|
+
digest: string,
|
|
3472
|
+
ikm: BinaryLike | KeyObject,
|
|
3473
|
+
salt: BinaryLike,
|
|
3474
|
+
info: BinaryLike,
|
|
3475
|
+
keylen: number,
|
|
3476
|
+
): ArrayBuffer;
|
|
3073
3477
|
interface SecureHeapUsage {
|
|
3074
3478
|
/**
|
|
3075
3479
|
* The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag.
|
|
@@ -3114,7 +3518,7 @@ declare module 'crypto' {
|
|
|
3114
3518
|
/**
|
|
3115
3519
|
* @default 'always'
|
|
3116
3520
|
*/
|
|
3117
|
-
subject?:
|
|
3521
|
+
subject?: "always" | "default" | "never";
|
|
3118
3522
|
/**
|
|
3119
3523
|
* @default true
|
|
3120
3524
|
*/
|
|
@@ -3279,7 +3683,7 @@ declare module 'crypto' {
|
|
|
3279
3683
|
* @since v15.6.0
|
|
3280
3684
|
* @return Returns `email` if the certificate matches, `undefined` if it does not.
|
|
3281
3685
|
*/
|
|
3282
|
-
checkEmail(email: string, options?: Pick<X509CheckOptions,
|
|
3686
|
+
checkEmail(email: string, options?: Pick<X509CheckOptions, "subject">): string | undefined;
|
|
3283
3687
|
/**
|
|
3284
3688
|
* Checks whether the certificate matches the given host name.
|
|
3285
3689
|
*
|
|
@@ -3393,9 +3797,21 @@ declare module 'crypto' {
|
|
|
3393
3797
|
* @param size The size (in bits) of the prime to generate.
|
|
3394
3798
|
*/
|
|
3395
3799
|
function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
|
|
3396
|
-
function generatePrime(
|
|
3397
|
-
|
|
3398
|
-
|
|
3800
|
+
function generatePrime(
|
|
3801
|
+
size: number,
|
|
3802
|
+
options: GeneratePrimeOptionsBigInt,
|
|
3803
|
+
callback: (err: Error | null, prime: bigint) => void,
|
|
3804
|
+
): void;
|
|
3805
|
+
function generatePrime(
|
|
3806
|
+
size: number,
|
|
3807
|
+
options: GeneratePrimeOptionsArrayBuffer,
|
|
3808
|
+
callback: (err: Error | null, prime: ArrayBuffer) => void,
|
|
3809
|
+
): void;
|
|
3810
|
+
function generatePrime(
|
|
3811
|
+
size: number,
|
|
3812
|
+
options: GeneratePrimeOptions,
|
|
3813
|
+
callback: (err: Error | null, prime: ArrayBuffer | bigint) => void,
|
|
3814
|
+
): void;
|
|
3399
3815
|
/**
|
|
3400
3816
|
* Generates a pseudorandom prime of `size` bits.
|
|
3401
3817
|
*
|
|
@@ -3444,7 +3860,11 @@ declare module 'crypto' {
|
|
|
3444
3860
|
* @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
|
|
3445
3861
|
*/
|
|
3446
3862
|
function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void;
|
|
3447
|
-
function checkPrime(
|
|
3863
|
+
function checkPrime(
|
|
3864
|
+
value: LargeNumberLike,
|
|
3865
|
+
options: CheckPrimeOptions,
|
|
3866
|
+
callback: (err: Error | null, result: boolean) => void,
|
|
3867
|
+
): void;
|
|
3448
3868
|
/**
|
|
3449
3869
|
* Checks the primality of the `candidate`.
|
|
3450
3870
|
* @since v15.8.0
|
|
@@ -3496,9 +3916,17 @@ declare module 'crypto' {
|
|
|
3496
3916
|
const webcrypto: webcrypto.Crypto;
|
|
3497
3917
|
namespace webcrypto {
|
|
3498
3918
|
type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
3499
|
-
type KeyFormat =
|
|
3500
|
-
type KeyType =
|
|
3501
|
-
type KeyUsage =
|
|
3919
|
+
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
|
|
3920
|
+
type KeyType = "private" | "public" | "secret";
|
|
3921
|
+
type KeyUsage =
|
|
3922
|
+
| "decrypt"
|
|
3923
|
+
| "deriveBits"
|
|
3924
|
+
| "deriveKey"
|
|
3925
|
+
| "encrypt"
|
|
3926
|
+
| "sign"
|
|
3927
|
+
| "unwrapKey"
|
|
3928
|
+
| "verify"
|
|
3929
|
+
| "wrapKey";
|
|
3502
3930
|
type AlgorithmIdentifier = Algorithm | string;
|
|
3503
3931
|
type HashAlgorithmIdentifier = AlgorithmIdentifier;
|
|
3504
3932
|
type NamedCurve = string;
|
|
@@ -3652,7 +4080,7 @@ declare module 'crypto' {
|
|
|
3652
4080
|
/** Illegal constructor */
|
|
3653
4081
|
(_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user.
|
|
3654
4082
|
readonly length: 0;
|
|
3655
|
-
readonly name:
|
|
4083
|
+
readonly name: "CryptoKey";
|
|
3656
4084
|
readonly prototype: CryptoKey;
|
|
3657
4085
|
}
|
|
3658
4086
|
/**
|
|
@@ -3725,7 +4153,11 @@ declare module 'crypto' {
|
|
|
3725
4153
|
* - `'AES-GCM'`
|
|
3726
4154
|
* @since v15.0.0
|
|
3727
4155
|
*/
|
|
3728
|
-
decrypt(
|
|
4156
|
+
decrypt(
|
|
4157
|
+
algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
|
|
4158
|
+
key: CryptoKey,
|
|
4159
|
+
data: BufferSource,
|
|
4160
|
+
): Promise<ArrayBuffer>;
|
|
3729
4161
|
/**
|
|
3730
4162
|
* Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
|
|
3731
4163
|
* `subtle.deriveBits()` attempts to generate `length` bits.
|
|
@@ -3744,7 +4176,11 @@ declare module 'crypto' {
|
|
|
3744
4176
|
* @since v15.0.0
|
|
3745
4177
|
*/
|
|
3746
4178
|
deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise<ArrayBuffer>;
|
|
3747
|
-
deriveBits(
|
|
4179
|
+
deriveBits(
|
|
4180
|
+
algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params,
|
|
4181
|
+
baseKey: CryptoKey,
|
|
4182
|
+
length: number,
|
|
4183
|
+
): Promise<ArrayBuffer>;
|
|
3748
4184
|
/**
|
|
3749
4185
|
* Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
|
|
3750
4186
|
* `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
|
|
@@ -3765,9 +4201,14 @@ declare module 'crypto' {
|
|
|
3765
4201
|
deriveKey(
|
|
3766
4202
|
algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
|
|
3767
4203
|
baseKey: CryptoKey,
|
|
3768
|
-
derivedKeyAlgorithm:
|
|
4204
|
+
derivedKeyAlgorithm:
|
|
4205
|
+
| AlgorithmIdentifier
|
|
4206
|
+
| AesDerivedKeyParams
|
|
4207
|
+
| HmacImportParams
|
|
4208
|
+
| HkdfParams
|
|
4209
|
+
| Pbkdf2Params,
|
|
3769
4210
|
extractable: boolean,
|
|
3770
|
-
keyUsages: ReadonlyArray<KeyUsage
|
|
4211
|
+
keyUsages: ReadonlyArray<KeyUsage>,
|
|
3771
4212
|
): Promise<CryptoKey>;
|
|
3772
4213
|
/**
|
|
3773
4214
|
* Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`.
|
|
@@ -3797,7 +4238,11 @@ declare module 'crypto' {
|
|
|
3797
4238
|
* - `'AES-GCM'`
|
|
3798
4239
|
* @since v15.0.0
|
|
3799
4240
|
*/
|
|
3800
|
-
encrypt(
|
|
4241
|
+
encrypt(
|
|
4242
|
+
algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
|
|
4243
|
+
key: CryptoKey,
|
|
4244
|
+
data: BufferSource,
|
|
4245
|
+
): Promise<ArrayBuffer>;
|
|
3801
4246
|
/**
|
|
3802
4247
|
* Exports the given key into the specified format, if supported.
|
|
3803
4248
|
*
|
|
@@ -3812,8 +4257,8 @@ declare module 'crypto' {
|
|
|
3812
4257
|
* @returns `<Promise>` containing `<ArrayBuffer>`.
|
|
3813
4258
|
* @since v15.0.0
|
|
3814
4259
|
*/
|
|
3815
|
-
exportKey(format:
|
|
3816
|
-
exportKey(format: Exclude<KeyFormat,
|
|
4260
|
+
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
|
4261
|
+
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
|
3817
4262
|
/**
|
|
3818
4263
|
* Using the method and parameters provided in `algorithm`,
|
|
3819
4264
|
* `subtle.generateKey()` attempts to generate new keying material.
|
|
@@ -3840,9 +4285,21 @@ declare module 'crypto' {
|
|
|
3840
4285
|
* @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
|
|
3841
4286
|
* @since v15.0.0
|
|
3842
4287
|
*/
|
|
3843
|
-
generateKey(
|
|
3844
|
-
|
|
3845
|
-
|
|
4288
|
+
generateKey(
|
|
4289
|
+
algorithm: RsaHashedKeyGenParams | EcKeyGenParams,
|
|
4290
|
+
extractable: boolean,
|
|
4291
|
+
keyUsages: ReadonlyArray<KeyUsage>,
|
|
4292
|
+
): Promise<CryptoKeyPair>;
|
|
4293
|
+
generateKey(
|
|
4294
|
+
algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params,
|
|
4295
|
+
extractable: boolean,
|
|
4296
|
+
keyUsages: ReadonlyArray<KeyUsage>,
|
|
4297
|
+
): Promise<CryptoKey>;
|
|
4298
|
+
generateKey(
|
|
4299
|
+
algorithm: AlgorithmIdentifier,
|
|
4300
|
+
extractable: boolean,
|
|
4301
|
+
keyUsages: KeyUsage[],
|
|
4302
|
+
): Promise<CryptoKeyPair | CryptoKey>;
|
|
3846
4303
|
/**
|
|
3847
4304
|
* The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
|
|
3848
4305
|
* to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
|
|
@@ -3854,18 +4311,28 @@ declare module 'crypto' {
|
|
|
3854
4311
|
* @since v15.0.0
|
|
3855
4312
|
*/
|
|
3856
4313
|
importKey(
|
|
3857
|
-
format:
|
|
4314
|
+
format: "jwk",
|
|
3858
4315
|
keyData: JsonWebKey,
|
|
3859
|
-
algorithm:
|
|
4316
|
+
algorithm:
|
|
4317
|
+
| AlgorithmIdentifier
|
|
4318
|
+
| RsaHashedImportParams
|
|
4319
|
+
| EcKeyImportParams
|
|
4320
|
+
| HmacImportParams
|
|
4321
|
+
| AesKeyAlgorithm,
|
|
3860
4322
|
extractable: boolean,
|
|
3861
|
-
keyUsages: ReadonlyArray<KeyUsage
|
|
4323
|
+
keyUsages: ReadonlyArray<KeyUsage>,
|
|
3862
4324
|
): Promise<CryptoKey>;
|
|
3863
4325
|
importKey(
|
|
3864
|
-
format: Exclude<KeyFormat,
|
|
4326
|
+
format: Exclude<KeyFormat, "jwk">,
|
|
3865
4327
|
keyData: BufferSource,
|
|
3866
|
-
algorithm:
|
|
4328
|
+
algorithm:
|
|
4329
|
+
| AlgorithmIdentifier
|
|
4330
|
+
| RsaHashedImportParams
|
|
4331
|
+
| EcKeyImportParams
|
|
4332
|
+
| HmacImportParams
|
|
4333
|
+
| AesKeyAlgorithm,
|
|
3867
4334
|
extractable: boolean,
|
|
3868
|
-
keyUsages: KeyUsage[]
|
|
4335
|
+
keyUsages: KeyUsage[],
|
|
3869
4336
|
): Promise<CryptoKey>;
|
|
3870
4337
|
/**
|
|
3871
4338
|
* Using the method and parameters given by `algorithm` and the keying material provided by `key`,
|
|
@@ -3882,7 +4349,11 @@ declare module 'crypto' {
|
|
|
3882
4349
|
* - `'HMAC'`
|
|
3883
4350
|
* @since v15.0.0
|
|
3884
4351
|
*/
|
|
3885
|
-
sign(
|
|
4352
|
+
sign(
|
|
4353
|
+
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params,
|
|
4354
|
+
key: CryptoKey,
|
|
4355
|
+
data: BufferSource,
|
|
4356
|
+
): Promise<ArrayBuffer>;
|
|
3886
4357
|
/**
|
|
3887
4358
|
* In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
|
|
3888
4359
|
* The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
|
|
@@ -3923,9 +4394,14 @@ declare module 'crypto' {
|
|
|
3923
4394
|
wrappedKey: BufferSource,
|
|
3924
4395
|
unwrappingKey: CryptoKey,
|
|
3925
4396
|
unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
|
|
3926
|
-
unwrappedKeyAlgorithm:
|
|
4397
|
+
unwrappedKeyAlgorithm:
|
|
4398
|
+
| AlgorithmIdentifier
|
|
4399
|
+
| RsaHashedImportParams
|
|
4400
|
+
| EcKeyImportParams
|
|
4401
|
+
| HmacImportParams
|
|
4402
|
+
| AesKeyAlgorithm,
|
|
3927
4403
|
extractable: boolean,
|
|
3928
|
-
keyUsages: KeyUsage[]
|
|
4404
|
+
keyUsages: KeyUsage[],
|
|
3929
4405
|
): Promise<CryptoKey>;
|
|
3930
4406
|
/**
|
|
3931
4407
|
* Using the method and parameters given in `algorithm` and the keying material provided by `key`,
|
|
@@ -3942,7 +4418,12 @@ declare module 'crypto' {
|
|
|
3942
4418
|
* - `'HMAC'`
|
|
3943
4419
|
* @since v15.0.0
|
|
3944
4420
|
*/
|
|
3945
|
-
verify(
|
|
4421
|
+
verify(
|
|
4422
|
+
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params,
|
|
4423
|
+
key: CryptoKey,
|
|
4424
|
+
signature: BufferSource,
|
|
4425
|
+
data: BufferSource,
|
|
4426
|
+
): Promise<boolean>;
|
|
3946
4427
|
/**
|
|
3947
4428
|
* In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
|
|
3948
4429
|
* The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
|
|
@@ -3961,10 +4442,15 @@ declare module 'crypto' {
|
|
|
3961
4442
|
* @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
|
|
3962
4443
|
* @since v15.0.0
|
|
3963
4444
|
*/
|
|
3964
|
-
wrapKey(
|
|
4445
|
+
wrapKey(
|
|
4446
|
+
format: KeyFormat,
|
|
4447
|
+
key: CryptoKey,
|
|
4448
|
+
wrappingKey: CryptoKey,
|
|
4449
|
+
wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
|
|
4450
|
+
): Promise<ArrayBuffer>;
|
|
3965
4451
|
}
|
|
3966
4452
|
}
|
|
3967
4453
|
}
|
|
3968
|
-
declare module
|
|
3969
|
-
export * from
|
|
4454
|
+
declare module "node:crypto" {
|
|
4455
|
+
export * from "crypto";
|
|
3970
4456
|
}
|