cdk-ecr-deployment 2.5.29 → 2.5.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/.gitattributes +1 -1
  2. package/.jsii +129 -27
  3. package/.jsii.tabl.json +1 -1
  4. package/.projenrc.ts +3 -1
  5. package/API.md +2 -0
  6. package/lambda/install.js +7 -6
  7. package/lib/index.d.ts +10 -0
  8. package/lib/index.js +6 -5
  9. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +0 -0
  10. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +4 -5
  11. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +4 -4
  12. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +48 -24
  13. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +15 -6
  14. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +43 -35
  15. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +267 -122
  16. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +107 -89
  17. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +17 -14
  18. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +12 -11
  19. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +755 -269
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +86 -45
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +28 -25
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +203 -62
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +67 -71
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +4 -4
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +127 -7
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +115 -73
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +560 -315
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +96 -18
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +0 -0
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +359 -195
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +629 -377
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +221 -112
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -46
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2 -3
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +195 -14
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +154 -93
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +9 -9
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +88 -95
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +13 -13
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +19 -18
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +166 -128
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +3 -3
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +14 -4
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +12 -7
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +69 -56
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +67 -61
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +10 -10
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +56 -15
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +40 -20
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +498 -218
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +8 -8
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +398 -170
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +4 -4
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +34 -9
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +162 -71
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +3 -3
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +17 -14
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +79 -7
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +359 -195
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
  80. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +221 -112
  81. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/index.d.ts +0 -0
  82. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
  83. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +195 -14
  84. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +154 -93
  85. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +9 -9
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +13 -13
  87. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
  88. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +166 -128
  89. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
  90. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
  91. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
  92. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
  93. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
  94. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
  95. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
  96. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
  97. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
  98. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
  99. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +398 -170
  100. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
  101. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
  102. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
  103. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
  104. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
  105. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +40 -14
  106. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +263 -129
  107. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
  108. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
  109. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +3 -3
  110. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
  111. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
  112. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +10 -10
  113. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +40 -14
  114. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +263 -129
  115. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +4 -4
  116. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +52 -45
  117. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +3 -3
  118. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +83 -85
  119. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +9 -9
  120. package/node_modules/@types/http-cache-semantics/LICENSE +0 -0
  121. package/node_modules/@types/http-cache-semantics/README.md +1 -2
  122. package/node_modules/@types/http-cache-semantics/index.d.ts +1 -6
  123. package/node_modules/@types/http-cache-semantics/package.json +5 -5
  124. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +0 -0
  125. package/node_modules/@types/keyv/node_modules/@types/node/README.md +4 -5
  126. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +4 -4
  127. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +48 -24
  128. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +15 -6
  129. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +43 -35
  130. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +267 -122
  131. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +107 -89
  132. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +17 -14
  133. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +12 -11
  134. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +755 -269
  135. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +86 -45
  136. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
  137. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +28 -25
  138. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +203 -62
  139. package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +67 -71
  140. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +4 -4
  141. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +127 -7
  142. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +115 -73
  143. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +560 -315
  144. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +96 -18
  145. package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +0 -0
  146. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +359 -195
  147. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +629 -377
  148. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +221 -112
  149. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -46
  150. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2 -3
  151. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +195 -14
  152. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +154 -93
  153. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +9 -9
  154. package/node_modules/@types/keyv/node_modules/@types/node/package.json +88 -95
  155. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +13 -13
  156. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +19 -18
  157. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +166 -128
  158. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +3 -3
  159. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +14 -4
  160. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +12 -7
  161. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +69 -56
  162. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +67 -61
  163. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +10 -10
  164. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +56 -15
  165. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +40 -20
  166. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +498 -218
  167. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +8 -8
  168. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +398 -170
  169. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +4 -4
  170. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +34 -9
  171. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +162 -71
  172. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +3 -3
  173. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
  174. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
  175. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
  176. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
  177. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
  178. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
  179. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +17 -14
  180. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
  181. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
  182. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
  183. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
  184. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
  185. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
  186. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
  187. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  188. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +79 -7
  189. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
  190. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
  191. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
  192. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
  193. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +359 -195
  194. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
  195. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +221 -112
  196. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/index.d.ts +0 -0
  197. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
  198. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +195 -14
  199. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +154 -93
  200. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +9 -9
  201. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +13 -13
  202. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
  203. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +166 -128
  204. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
  205. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
  206. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
  207. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
  208. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
  209. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
  210. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
  211. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
  212. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
  213. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
  214. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +398 -170
  215. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
  216. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
  217. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
  218. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
  219. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
  220. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +40 -14
  221. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +263 -129
  222. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
  223. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
  224. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +3 -3
  225. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
  226. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
  227. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +10 -10
  228. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +40 -14
  229. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +263 -129
  230. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +4 -4
  231. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +52 -45
  232. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +3 -3
  233. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +83 -85
  234. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +9 -9
  235. package/node_modules/@types/responselike/LICENSE +21 -21
  236. package/node_modules/@types/responselike/README.md +39 -7
  237. package/node_modules/@types/responselike/index.d.ts +3 -8
  238. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +0 -0
  239. package/node_modules/@types/responselike/node_modules/@types/node/README.md +4 -5
  240. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +4 -4
  241. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +48 -24
  242. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +15 -6
  243. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +43 -35
  244. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +267 -122
  245. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +107 -89
  246. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +17 -14
  247. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +12 -11
  248. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +755 -269
  249. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +86 -45
  250. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
  251. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +28 -25
  252. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +203 -62
  253. package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +67 -71
  254. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +4 -4
  255. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +127 -7
  256. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +115 -73
  257. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +560 -315
  258. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +96 -18
  259. package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +0 -0
  260. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +359 -195
  261. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +629 -377
  262. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +221 -112
  263. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -46
  264. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2 -3
  265. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +195 -14
  266. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +154 -93
  267. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +9 -9
  268. package/node_modules/@types/responselike/node_modules/@types/node/package.json +88 -95
  269. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +13 -13
  270. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +19 -18
  271. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +166 -128
  272. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +3 -3
  273. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +14 -4
  274. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +12 -7
  275. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +69 -56
  276. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +67 -61
  277. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +10 -10
  278. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +56 -15
  279. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +40 -20
  280. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +498 -218
  281. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +8 -8
  282. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +398 -170
  283. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +4 -4
  284. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +34 -9
  285. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +162 -71
  286. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +3 -3
  287. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
  288. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +48 -24
  289. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +15 -6
  290. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +44 -36
  291. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +267 -122
  292. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
  293. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +17 -14
  294. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
  295. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +755 -269
  296. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +86 -45
  297. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
  298. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +28 -25
  299. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +203 -62
  300. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
  301. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  302. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +79 -7
  303. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +117 -74
  304. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +560 -315
  305. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +96 -18
  306. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
  307. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +359 -195
  308. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +629 -377
  309. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +221 -112
  310. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/index.d.ts +0 -0
  311. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +2 -3
  312. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +195 -14
  313. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +154 -93
  314. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +9 -9
  315. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +13 -13
  316. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
  317. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +166 -128
  318. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +3 -3
  319. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
  320. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
  321. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
  322. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
  323. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
  324. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
  325. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
  326. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +1162 -853
  327. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
  328. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +398 -170
  329. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
  330. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +34 -9
  331. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +162 -71
  332. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
  333. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
  334. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +40 -14
  335. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +263 -129
  336. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
  337. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +52 -45
  338. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +3 -3
  339. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -85
  340. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
  341. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +10 -10
  342. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +40 -14
  343. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +263 -129
  344. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +4 -4
  345. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +52 -45
  346. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +3 -3
  347. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +83 -85
  348. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +9 -9
  349. package/node_modules/@types/responselike/package.json +9 -7
  350. package/node_modules/keyv/README.md +2 -0
  351. package/node_modules/keyv/package.json +13 -14
  352. package/node_modules/keyv/src/index.d.ts +6 -10
  353. package/node_modules/keyv/src/index.js +7 -12
  354. package/node_modules/undici-types/README.md +6 -0
  355. package/node_modules/undici-types/agent.d.ts +31 -0
  356. package/node_modules/undici-types/api.d.ts +43 -0
  357. package/node_modules/undici-types/balanced-pool.d.ts +18 -0
  358. package/node_modules/undici-types/cache.d.ts +36 -0
  359. package/node_modules/undici-types/client.d.ts +97 -0
  360. package/node_modules/undici-types/connector.d.ts +34 -0
  361. package/node_modules/undici-types/content-type.d.ts +21 -0
  362. package/node_modules/undici-types/cookies.d.ts +28 -0
  363. package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  364. package/node_modules/undici-types/dispatcher.d.ts +241 -0
  365. package/node_modules/undici-types/errors.d.ts +128 -0
  366. package/node_modules/undici-types/fetch.d.ts +209 -0
  367. package/node_modules/undici-types/file.d.ts +39 -0
  368. package/node_modules/undici-types/filereader.d.ts +54 -0
  369. package/node_modules/undici-types/formdata.d.ts +108 -0
  370. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  371. package/node_modules/undici-types/global-origin.d.ts +7 -0
  372. package/node_modules/undici-types/handlers.d.ts +9 -0
  373. package/node_modules/undici-types/header.d.ts +4 -0
  374. package/node_modules/undici-types/index.d.ts +63 -0
  375. package/node_modules/undici-types/interceptors.d.ts +5 -0
  376. package/node_modules/undici-types/mock-agent.d.ts +50 -0
  377. package/node_modules/undici-types/mock-client.d.ts +25 -0
  378. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  379. package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  380. package/node_modules/undici-types/mock-pool.d.ts +25 -0
  381. package/node_modules/undici-types/package.json +55 -0
  382. package/node_modules/undici-types/patch.d.ts +71 -0
  383. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  384. package/node_modules/undici-types/pool.d.ts +28 -0
  385. package/node_modules/undici-types/proxy-agent.d.ts +30 -0
  386. package/node_modules/undici-types/readable.d.ts +61 -0
  387. package/node_modules/undici-types/webidl.d.ts +220 -0
  388. package/node_modules/undici-types/websocket.d.ts +131 -0
  389. package/package.json +10 -11
  390. /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/buffer-stream.js +0 -0
  391. /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/index.d.ts +0 -0
  392. /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/index.js +0 -0
  393. /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/license +0 -0
  394. /package/node_modules/{cacheable-request/node_modules/get-stream → get-stream}/package.json +0 -0
  395. /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 'crypto' {
20
- import * as stream from 'node:stream';
21
- import { PeerCertificate } from 'node:tls';
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 = 'base64' | 'base64url' | 'hex' | 'binary';
263
- type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
264
- type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
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 = 'compressed' | 'uncompressed' | 'hybrid';
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 = 'secret' | 'public' | 'private';
485
+ type KeyObjectType = "secret" | "public" | "private";
486
486
  interface KeyExportOptions<T extends KeyFormat> {
487
- type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
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: 'jwk';
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<'pem'>): string | Buffer;
638
- export(options?: KeyExportOptions<'der'>): Buffer;
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 = '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';
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(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM;
740
- function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB;
741
- function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM;
742
- function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
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(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM;
997
- function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB;
998
- function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
999
- function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
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?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
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?: 'pkcs1' | 'spki' | undefined;
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: 'hmac' | 'aes',
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: 'hmac' | 'aes',
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: 'jwk';
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 = 'der' | 'ieee-p1363';
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(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
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(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: NodeJS.ArrayBufferView): boolean;
1463
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
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(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
1483
- function createDiffieHellman(prime: ArrayBuffer | NodeJS.ArrayBufferView, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
1484
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator?: number | ArrayBuffer | NodeJS.ArrayBufferView): DiffieHellman;
1485
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
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, and returns
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(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
1544
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
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 (name: string): DiffieHellmanGroup;
1720
+ new(name: string): DiffieHellmanGroup;
1639
1721
  (name: string): DiffieHellmanGroup;
1640
1722
  readonly prototype: DiffieHellmanGroup;
1641
1723
  }
1642
- type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
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(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
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(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
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>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
1969
- function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
1970
- function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
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(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void;
2015
- function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void;
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?: 'latin1' | 'hex' | 'base64' | 'base64url',
2230
- format?: 'uncompressed' | 'compressed' | 'hybrid'
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(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
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 = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
2337
- type KeyFormat = 'pem' | 'der' | 'jwk';
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: 'pkcs1' | 'spki';
2534
+ type: "pkcs1" | "spki";
2413
2535
  format: PubF;
2414
2536
  };
2415
2537
  privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2416
- type: 'pkcs1' | 'pkcs8';
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: 'spki';
2564
+ type: "spki";
2443
2565
  format: PubF;
2444
2566
  };
2445
2567
  privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2446
- type: 'pkcs8';
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: 'spki';
2581
+ type: "spki";
2460
2582
  format: PubF;
2461
2583
  };
2462
2584
  privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2463
- type: 'pkcs8';
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: 'pkcs1' | 'spki';
2594
+ type: "pkcs1" | "spki";
2473
2595
  format: PubF;
2474
2596
  };
2475
2597
  privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2476
- type: 'sec1' | 'pkcs8';
2598
+ type: "sec1" | "pkcs8";
2477
2599
  };
2478
2600
  }
2479
2601
  interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2480
2602
  publicKeyEncoding: {
2481
- type: 'spki';
2603
+ type: "spki";
2482
2604
  format: PubF;
2483
2605
  };
2484
2606
  privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2485
- type: 'pkcs8';
2607
+ type: "pkcs8";
2486
2608
  };
2487
2609
  }
2488
2610
  interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2489
2611
  publicKeyEncoding: {
2490
- type: 'spki';
2612
+ type: "spki";
2491
2613
  format: PubF;
2492
2614
  };
2493
2615
  privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2494
- type: 'pkcs8';
2616
+ type: "pkcs8";
2495
2617
  };
2496
2618
  }
2497
2619
  interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2498
2620
  publicKeyEncoding: {
2499
- type: 'spki';
2621
+ type: "spki";
2500
2622
  format: PubF;
2501
2623
  };
2502
2624
  privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2503
- type: 'pkcs8';
2625
+ type: "pkcs8";
2504
2626
  };
2505
2627
  }
2506
2628
  interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2507
2629
  publicKeyEncoding: {
2508
- type: 'spki';
2630
+ type: "spki";
2509
2631
  format: PubF;
2510
2632
  };
2511
2633
  privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2512
- type: 'pkcs8';
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(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2561
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2562
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2563
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2564
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2565
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2566
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2567
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2568
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2569
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2570
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2571
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2572
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2573
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2574
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2575
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2576
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2577
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2578
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2579
- function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2580
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2581
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2582
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2583
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2584
- function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2585
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2586
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2587
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2588
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2589
- function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2590
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2591
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2592
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2593
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2594
- function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2595
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2596
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2597
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2598
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2599
- function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
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(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2640
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2641
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2642
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2643
- function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2644
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2645
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2646
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2647
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2648
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2649
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2650
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2651
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2652
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2653
- function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2654
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2655
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2656
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2657
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2658
- function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2659
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2660
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2661
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2662
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2663
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2664
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2665
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2666
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2667
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2668
- function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2669
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2670
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2671
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2672
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2673
- function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2674
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2675
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2676
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2677
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2678
- function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
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: 'rsa',
2682
- options: RSAKeyPairOptions<'pem', 'pem'>
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: 'rsa',
2689
- options: RSAKeyPairOptions<'pem', 'der'>
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: 'rsa',
2696
- options: RSAKeyPairOptions<'der', 'pem'>
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: 'rsa',
2703
- options: RSAKeyPairOptions<'der', 'der'>
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: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3086
+ function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2709
3087
  function __promisify__(
2710
- type: 'rsa-pss',
2711
- options: RSAPSSKeyPairOptions<'pem', 'pem'>
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: 'rsa-pss',
2718
- options: RSAPSSKeyPairOptions<'pem', 'der'>
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: 'rsa-pss',
2725
- options: RSAPSSKeyPairOptions<'der', 'pem'>
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: 'rsa-pss',
2732
- options: RSAPSSKeyPairOptions<'der', 'der'>
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: 'dsa',
2740
- options: DSAKeyPairOptions<'pem', 'pem'>
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: 'dsa',
2747
- options: DSAKeyPairOptions<'pem', 'der'>
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: 'dsa',
2754
- options: DSAKeyPairOptions<'der', 'pem'>
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: 'dsa',
2761
- options: DSAKeyPairOptions<'der', 'der'>
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: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3147
+ function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2767
3148
  function __promisify__(
2768
- type: 'ec',
2769
- options: ECKeyPairOptions<'pem', 'pem'>
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: 'ec',
2776
- options: ECKeyPairOptions<'pem', 'der'>
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: 'ec',
2783
- options: ECKeyPairOptions<'der', 'pem'>
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: 'ec',
2790
- options: ECKeyPairOptions<'der', 'der'>
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: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3176
+ function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2796
3177
  function __promisify__(
2797
- type: 'ed25519',
2798
- options: ED25519KeyPairOptions<'pem', 'pem'>
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: 'ed25519',
2805
- options: ED25519KeyPairOptions<'pem', 'der'>
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: 'ed25519',
2812
- options: ED25519KeyPairOptions<'der', 'pem'>
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: 'ed25519',
2819
- options: ED25519KeyPairOptions<'der', 'der'>
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: 'ed448',
2827
- options: ED448KeyPairOptions<'pem', 'pem'>
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: 'ed448',
2834
- options: ED448KeyPairOptions<'pem', 'der'>
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: 'ed448',
2841
- options: ED448KeyPairOptions<'der', 'pem'>
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: 'ed448',
2848
- options: ED448KeyPairOptions<'der', 'der'>
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: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3237
+ function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2854
3238
  function __promisify__(
2855
- type: 'x25519',
2856
- options: X25519KeyPairOptions<'pem', 'pem'>
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: 'x25519',
2863
- options: X25519KeyPairOptions<'pem', 'der'>
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: 'x25519',
2870
- options: X25519KeyPairOptions<'der', 'pem'>
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: 'x25519',
2877
- options: X25519KeyPairOptions<'der', 'der'>
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: 'x448',
2885
- options: X448KeyPairOptions<'pem', 'pem'>
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: 'x448',
2892
- options: X448KeyPairOptions<'pem', 'der'>
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: 'x448',
2899
- options: X448KeyPairOptions<'der', 'pem'>
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: 'x448',
2906
- options: X448KeyPairOptions<'der', 'der'>
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: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
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
- callback: (error: Error | null, data: Buffer) => void
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 = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts';
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(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void;
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(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer;
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.
@@ -3113,7 +3517,7 @@ declare module 'crypto' {
3113
3517
  /**
3114
3518
  * @default 'always'
3115
3519
  */
3116
- subject?: 'always' | 'default' | 'never';
3520
+ subject?: "always" | "default" | "never";
3117
3521
  /**
3118
3522
  * @default true
3119
3523
  */
@@ -3278,7 +3682,7 @@ declare module 'crypto' {
3278
3682
  * @since v15.6.0
3279
3683
  * @return Returns `email` if the certificate matches, `undefined` if it does not.
3280
3684
  */
3281
- checkEmail(email: string, options?: Pick<X509CheckOptions, 'subject'>): string | undefined;
3685
+ checkEmail(email: string, options?: Pick<X509CheckOptions, "subject">): string | undefined;
3282
3686
  /**
3283
3687
  * Checks whether the certificate matches the given host name.
3284
3688
  *
@@ -3392,9 +3796,21 @@ declare module 'crypto' {
3392
3796
  * @param size The size (in bits) of the prime to generate.
3393
3797
  */
3394
3798
  function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
3395
- function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void;
3396
- function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
3397
- function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void;
3799
+ function generatePrime(
3800
+ size: number,
3801
+ options: GeneratePrimeOptionsBigInt,
3802
+ callback: (err: Error | null, prime: bigint) => void,
3803
+ ): void;
3804
+ function generatePrime(
3805
+ size: number,
3806
+ options: GeneratePrimeOptionsArrayBuffer,
3807
+ callback: (err: Error | null, prime: ArrayBuffer) => void,
3808
+ ): void;
3809
+ function generatePrime(
3810
+ size: number,
3811
+ options: GeneratePrimeOptions,
3812
+ callback: (err: Error | null, prime: ArrayBuffer | bigint) => void,
3813
+ ): void;
3398
3814
  /**
3399
3815
  * Generates a pseudorandom prime of `size` bits.
3400
3816
  *
@@ -3443,7 +3859,11 @@ declare module 'crypto' {
3443
3859
  * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
3444
3860
  */
3445
3861
  function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void;
3446
- function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void;
3862
+ function checkPrime(
3863
+ value: LargeNumberLike,
3864
+ options: CheckPrimeOptions,
3865
+ callback: (err: Error | null, result: boolean) => void,
3866
+ ): void;
3447
3867
  /**
3448
3868
  * Checks the primality of the `candidate`.
3449
3869
  * @since v15.8.0
@@ -3495,9 +3915,17 @@ declare module 'crypto' {
3495
3915
  const webcrypto: webcrypto.Crypto;
3496
3916
  namespace webcrypto {
3497
3917
  type BufferSource = ArrayBufferView | ArrayBuffer;
3498
- type KeyFormat = 'jwk' | 'pkcs8' | 'raw' | 'spki';
3499
- type KeyType = 'private' | 'public' | 'secret';
3500
- type KeyUsage = 'decrypt' | 'deriveBits' | 'deriveKey' | 'encrypt' | 'sign' | 'unwrapKey' | 'verify' | 'wrapKey';
3918
+ type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
3919
+ type KeyType = "private" | "public" | "secret";
3920
+ type KeyUsage =
3921
+ | "decrypt"
3922
+ | "deriveBits"
3923
+ | "deriveKey"
3924
+ | "encrypt"
3925
+ | "sign"
3926
+ | "unwrapKey"
3927
+ | "verify"
3928
+ | "wrapKey";
3501
3929
  type AlgorithmIdentifier = Algorithm | string;
3502
3930
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
3503
3931
  type NamedCurve = string;
@@ -3651,7 +4079,7 @@ declare module 'crypto' {
3651
4079
  /** Illegal constructor */
3652
4080
  (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user.
3653
4081
  readonly length: 0;
3654
- readonly name: 'CryptoKey';
4082
+ readonly name: "CryptoKey";
3655
4083
  readonly prototype: CryptoKey;
3656
4084
  }
3657
4085
  /**
@@ -3724,7 +4152,11 @@ declare module 'crypto' {
3724
4152
  * - `'AES-GCM'`
3725
4153
  * @since v15.0.0
3726
4154
  */
3727
- decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
4155
+ decrypt(
4156
+ algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
4157
+ key: CryptoKey,
4158
+ data: BufferSource,
4159
+ ): Promise<ArrayBuffer>;
3728
4160
  /**
3729
4161
  * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
3730
4162
  * `subtle.deriveBits()` attempts to generate `length` bits.
@@ -3743,7 +4175,11 @@ declare module 'crypto' {
3743
4175
  * @since v15.0.0
3744
4176
  */
3745
4177
  deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise<ArrayBuffer>;
3746
- deriveBits(algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
4178
+ deriveBits(
4179
+ algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params,
4180
+ baseKey: CryptoKey,
4181
+ length: number,
4182
+ ): Promise<ArrayBuffer>;
3747
4183
  /**
3748
4184
  * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
3749
4185
  * `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
@@ -3764,9 +4200,14 @@ declare module 'crypto' {
3764
4200
  deriveKey(
3765
4201
  algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
3766
4202
  baseKey: CryptoKey,
3767
- derivedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params,
4203
+ derivedKeyAlgorithm:
4204
+ | AlgorithmIdentifier
4205
+ | AesDerivedKeyParams
4206
+ | HmacImportParams
4207
+ | HkdfParams
4208
+ | Pbkdf2Params,
3768
4209
  extractable: boolean,
3769
- keyUsages: ReadonlyArray<KeyUsage>
4210
+ keyUsages: ReadonlyArray<KeyUsage>,
3770
4211
  ): Promise<CryptoKey>;
3771
4212
  /**
3772
4213
  * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`.
@@ -3796,7 +4237,11 @@ declare module 'crypto' {
3796
4237
  * - `'AES-GCM'`
3797
4238
  * @since v15.0.0
3798
4239
  */
3799
- encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
4240
+ encrypt(
4241
+ algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
4242
+ key: CryptoKey,
4243
+ data: BufferSource,
4244
+ ): Promise<ArrayBuffer>;
3800
4245
  /**
3801
4246
  * Exports the given key into the specified format, if supported.
3802
4247
  *
@@ -3811,8 +4256,8 @@ declare module 'crypto' {
3811
4256
  * @returns `<Promise>` containing `<ArrayBuffer>`.
3812
4257
  * @since v15.0.0
3813
4258
  */
3814
- exportKey(format: 'jwk', key: CryptoKey): Promise<JsonWebKey>;
3815
- exportKey(format: Exclude<KeyFormat, 'jwk'>, key: CryptoKey): Promise<ArrayBuffer>;
4259
+ exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
4260
+ exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
3816
4261
  /**
3817
4262
  * Using the method and parameters provided in `algorithm`,
3818
4263
  * `subtle.generateKey()` attempts to generate new keying material.
@@ -3839,9 +4284,21 @@ declare module 'crypto' {
3839
4284
  * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
3840
4285
  * @since v15.0.0
3841
4286
  */
3842
- generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
3843
- generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
3844
- generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
4287
+ generateKey(
4288
+ algorithm: RsaHashedKeyGenParams | EcKeyGenParams,
4289
+ extractable: boolean,
4290
+ keyUsages: ReadonlyArray<KeyUsage>,
4291
+ ): Promise<CryptoKeyPair>;
4292
+ generateKey(
4293
+ algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params,
4294
+ extractable: boolean,
4295
+ keyUsages: ReadonlyArray<KeyUsage>,
4296
+ ): Promise<CryptoKey>;
4297
+ generateKey(
4298
+ algorithm: AlgorithmIdentifier,
4299
+ extractable: boolean,
4300
+ keyUsages: KeyUsage[],
4301
+ ): Promise<CryptoKeyPair | CryptoKey>;
3845
4302
  /**
3846
4303
  * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
3847
4304
  * to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
@@ -3853,18 +4310,28 @@ declare module 'crypto' {
3853
4310
  * @since v15.0.0
3854
4311
  */
3855
4312
  importKey(
3856
- format: 'jwk',
4313
+ format: "jwk",
3857
4314
  keyData: JsonWebKey,
3858
- algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
4315
+ algorithm:
4316
+ | AlgorithmIdentifier
4317
+ | RsaHashedImportParams
4318
+ | EcKeyImportParams
4319
+ | HmacImportParams
4320
+ | AesKeyAlgorithm,
3859
4321
  extractable: boolean,
3860
- keyUsages: ReadonlyArray<KeyUsage>
4322
+ keyUsages: ReadonlyArray<KeyUsage>,
3861
4323
  ): Promise<CryptoKey>;
3862
4324
  importKey(
3863
- format: Exclude<KeyFormat, 'jwk'>,
4325
+ format: Exclude<KeyFormat, "jwk">,
3864
4326
  keyData: BufferSource,
3865
- algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
4327
+ algorithm:
4328
+ | AlgorithmIdentifier
4329
+ | RsaHashedImportParams
4330
+ | EcKeyImportParams
4331
+ | HmacImportParams
4332
+ | AesKeyAlgorithm,
3866
4333
  extractable: boolean,
3867
- keyUsages: KeyUsage[]
4334
+ keyUsages: KeyUsage[],
3868
4335
  ): Promise<CryptoKey>;
3869
4336
  /**
3870
4337
  * Using the method and parameters given by `algorithm` and the keying material provided by `key`,
@@ -3881,7 +4348,11 @@ declare module 'crypto' {
3881
4348
  * - `'HMAC'`
3882
4349
  * @since v15.0.0
3883
4350
  */
3884
- sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
4351
+ sign(
4352
+ algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params,
4353
+ key: CryptoKey,
4354
+ data: BufferSource,
4355
+ ): Promise<ArrayBuffer>;
3885
4356
  /**
3886
4357
  * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
3887
4358
  * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
@@ -3922,9 +4393,14 @@ declare module 'crypto' {
3922
4393
  wrappedKey: BufferSource,
3923
4394
  unwrappingKey: CryptoKey,
3924
4395
  unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
3925
- unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
4396
+ unwrappedKeyAlgorithm:
4397
+ | AlgorithmIdentifier
4398
+ | RsaHashedImportParams
4399
+ | EcKeyImportParams
4400
+ | HmacImportParams
4401
+ | AesKeyAlgorithm,
3926
4402
  extractable: boolean,
3927
- keyUsages: KeyUsage[]
4403
+ keyUsages: KeyUsage[],
3928
4404
  ): Promise<CryptoKey>;
3929
4405
  /**
3930
4406
  * Using the method and parameters given in `algorithm` and the keying material provided by `key`,
@@ -3941,7 +4417,12 @@ declare module 'crypto' {
3941
4417
  * - `'HMAC'`
3942
4418
  * @since v15.0.0
3943
4419
  */
3944
- verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
4420
+ verify(
4421
+ algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params,
4422
+ key: CryptoKey,
4423
+ signature: BufferSource,
4424
+ data: BufferSource,
4425
+ ): Promise<boolean>;
3945
4426
  /**
3946
4427
  * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
3947
4428
  * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
@@ -3960,10 +4441,15 @@ declare module 'crypto' {
3960
4441
  * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
3961
4442
  * @since v15.0.0
3962
4443
  */
3963
- wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
4444
+ wrapKey(
4445
+ format: KeyFormat,
4446
+ key: CryptoKey,
4447
+ wrappingKey: CryptoKey,
4448
+ wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
4449
+ ): Promise<ArrayBuffer>;
3964
4450
  }
3965
4451
  }
3966
4452
  }
3967
- declare module 'node:crypto' {
3968
- export * from 'crypto';
4453
+ declare module "node:crypto" {
4454
+ export * from "crypto";
3969
4455
  }