cloudstructs 0.5.3 → 0.5.6

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 (408) hide show
  1. package/.jsii +11 -4
  2. package/assets/slack-app/provider.lambda/index.js +107 -105
  3. package/assets/slack-textract/detect.lambda/index.js +113 -110
  4. package/assets/url-shortener/shortener.lambda/index.js +9 -23
  5. package/lib/codecommit-mirror/index.d.ts +0 -1
  6. package/lib/codecommit-mirror/index.js +5 -6
  7. package/lib/ecs-service-roller/index.d.ts +0 -1
  8. package/lib/ecs-service-roller/index.js +5 -6
  9. package/lib/email-receiver/index.d.ts +0 -1
  10. package/lib/email-receiver/receiver.d.ts +0 -1
  11. package/lib/email-receiver/receiver.js +1 -1
  12. package/lib/email-receiver/s3-function.d.ts +0 -1
  13. package/lib/email-receiver/s3.lambda.d.ts +0 -1
  14. package/lib/email-receiver/whitelist-function.d.ts +0 -1
  15. package/lib/email-receiver/whitelist.lambda.d.ts +0 -1
  16. package/lib/index.d.ts +0 -1
  17. package/lib/saml-identity-provider/index.d.ts +0 -1
  18. package/lib/saml-identity-provider/index.js +4 -5
  19. package/lib/slack-app/index.d.ts +0 -1
  20. package/lib/slack-app/manifest.d.ts +0 -1
  21. package/lib/slack-app/manifest.js +33 -35
  22. package/lib/slack-app/provider-function.d.ts +0 -1
  23. package/lib/slack-app/provider.d.ts +0 -1
  24. package/lib/slack-app/provider.js +2 -3
  25. package/lib/slack-app/provider.lambda.d.ts +0 -1
  26. package/lib/slack-app/provider.lambda.js +3 -4
  27. package/lib/slack-app/slack-app.d.ts +0 -1
  28. package/lib/slack-app/slack-app.js +4 -5
  29. package/lib/slack-events/events-function.d.ts +0 -1
  30. package/lib/slack-events/events.lambda.d.ts +0 -1
  31. package/lib/slack-events/index.d.ts +0 -1
  32. package/lib/slack-events/index.js +1 -1
  33. package/lib/slack-events/signature.d.ts +0 -1
  34. package/lib/slack-textract/detect-function.d.ts +0 -1
  35. package/lib/slack-textract/detect.lambda.d.ts +0 -1
  36. package/lib/slack-textract/index.d.ts +0 -1
  37. package/lib/slack-textract/index.js +1 -1
  38. package/lib/state-machine-cr-provider/index.d.ts +0 -1
  39. package/lib/state-machine-cr-provider/index.js +3 -4
  40. package/lib/state-machine-cr-provider/runtime/http.d.ts +0 -1
  41. package/lib/state-machine-cr-provider/runtime/http.js +3 -4
  42. package/lib/state-machine-cr-provider/runtime/index.d.ts +0 -1
  43. package/lib/state-machine-cr-provider/runtime/index.js +5 -7
  44. package/lib/static-website/index.d.ts +0 -1
  45. package/lib/static-website/index.js +3 -4
  46. package/lib/static-website/origin-request-function.d.ts +0 -1
  47. package/lib/static-website/origin-request.edge-lambda.d.ts +0 -1
  48. package/lib/toolkit-cleaner/clean-images-function.d.ts +0 -1
  49. package/lib/toolkit-cleaner/clean-images.lambda.d.ts +0 -1
  50. package/lib/toolkit-cleaner/clean-images.lambda.js +3 -4
  51. package/lib/toolkit-cleaner/clean-objects-function.d.ts +0 -1
  52. package/lib/toolkit-cleaner/clean-objects.lambda.d.ts +0 -1
  53. package/lib/toolkit-cleaner/clean-objects.lambda.js +3 -4
  54. package/lib/toolkit-cleaner/extract-template-hashes-function.d.ts +0 -1
  55. package/lib/toolkit-cleaner/extract-template-hashes.lambda.d.ts +0 -1
  56. package/lib/toolkit-cleaner/get-stack-names-function.d.ts +0 -1
  57. package/lib/toolkit-cleaner/get-stack-names.lambda.d.ts +0 -1
  58. package/lib/toolkit-cleaner/get-stack-names.lambda.js +2 -3
  59. package/lib/toolkit-cleaner/index.d.ts +0 -1
  60. package/lib/toolkit-cleaner/index.js +4 -5
  61. package/lib/url-shortener/index.d.ts +0 -1
  62. package/lib/url-shortener/index.js +4 -5
  63. package/lib/url-shortener/redirect-function.d.ts +0 -1
  64. package/lib/url-shortener/redirect.edge-lambda.d.ts +0 -1
  65. package/lib/url-shortener/redirect.edge-lambda.js +2 -3
  66. package/lib/url-shortener/shortener-function.d.ts +0 -1
  67. package/lib/url-shortener/shortener.lambda.d.ts +0 -1
  68. package/lib/url-shortener/shortener.lambda.js +3 -4
  69. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  70. package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +7 -8
  71. package/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +2 -2
  72. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +11 -5
  73. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +6 -3
  74. package/node_modules/@slack/logger/node_modules/@types/node/cluster.d.ts +14 -18
  75. package/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +1 -1
  76. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +668 -42
  77. package/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +2 -2
  78. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +2 -1
  79. package/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +2 -2
  80. package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +2 -2
  81. package/node_modules/@slack/logger/node_modules/@types/node/domain.d.ts +3 -2
  82. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +17 -27
  83. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +40 -17
  84. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +33 -44
  85. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +79 -23
  86. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +7 -2
  87. package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +11 -1
  88. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +2 -1
  89. package/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +10 -13
  90. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +27 -7
  91. package/node_modules/@slack/logger/node_modules/@types/node/os.d.ts +5 -4
  92. package/node_modules/@slack/logger/node_modules/@types/node/package.json +3 -3
  93. package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +1 -1
  94. package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +16 -2
  95. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +14 -13
  96. package/node_modules/@slack/logger/node_modules/@types/node/punycode.d.ts +1 -1
  97. package/node_modules/@slack/logger/node_modules/@types/node/querystring.d.ts +1 -1
  98. package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +2 -2
  99. package/node_modules/@slack/logger/node_modules/@types/node/repl.d.ts +2 -2
  100. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +80 -15
  101. package/node_modules/@slack/logger/node_modules/@types/node/string_decoder.d.ts +1 -1
  102. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +142 -0
  103. package/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +3 -3
  104. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +18 -10
  105. package/node_modules/@slack/logger/node_modules/@types/node/trace_events.d.ts +11 -1
  106. package/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +4 -2
  107. package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +25 -19
  108. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +20 -9
  109. package/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +19 -1
  110. package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +5 -3
  111. package/node_modules/@slack/logger/node_modules/@types/node/wasi.d.ts +1 -1
  112. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +2 -5
  113. package/node_modules/@slack/logger/node_modules/@types/node/zlib.d.ts +1 -1
  114. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  115. package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +7 -8
  116. package/node_modules/@slack/web-api/node_modules/@types/node/async_hooks.d.ts +2 -2
  117. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +11 -5
  118. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +6 -3
  119. package/node_modules/@slack/web-api/node_modules/@types/node/cluster.d.ts +14 -18
  120. package/node_modules/@slack/web-api/node_modules/@types/node/console.d.ts +1 -1
  121. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +668 -42
  122. package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +2 -2
  123. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +2 -1
  124. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +2 -2
  125. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +2 -2
  126. package/node_modules/@slack/web-api/node_modules/@types/node/domain.d.ts +3 -2
  127. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +17 -27
  128. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +40 -17
  129. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +33 -44
  130. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +79 -23
  131. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +7 -2
  132. package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +11 -1
  133. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +2 -1
  134. package/node_modules/@slack/web-api/node_modules/@types/node/inspector.d.ts +10 -13
  135. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +27 -7
  136. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +5 -4
  137. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +3 -3
  138. package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +1 -1
  139. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +16 -2
  140. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +14 -13
  141. package/node_modules/@slack/web-api/node_modules/@types/node/punycode.d.ts +1 -1
  142. package/node_modules/@slack/web-api/node_modules/@types/node/querystring.d.ts +1 -1
  143. package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +2 -2
  144. package/node_modules/@slack/web-api/node_modules/@types/node/repl.d.ts +2 -2
  145. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +80 -15
  146. package/node_modules/@slack/web-api/node_modules/@types/node/string_decoder.d.ts +1 -1
  147. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +142 -0
  148. package/node_modules/@slack/web-api/node_modules/@types/node/timers.d.ts +3 -3
  149. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +18 -10
  150. package/node_modules/@slack/web-api/node_modules/@types/node/trace_events.d.ts +11 -1
  151. package/node_modules/@slack/web-api/node_modules/@types/node/tty.d.ts +4 -2
  152. package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +25 -19
  153. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +20 -9
  154. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +19 -1
  155. package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +5 -3
  156. package/node_modules/@slack/web-api/node_modules/@types/node/wasi.d.ts +1 -1
  157. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +2 -5
  158. package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +1 -1
  159. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  160. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +7 -8
  161. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +2 -2
  162. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +11 -5
  163. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +6 -3
  164. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +14 -18
  165. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +1 -1
  166. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +668 -42
  167. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +2 -2
  168. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +2 -1
  169. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +2 -2
  170. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +2 -2
  171. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +3 -2
  172. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +17 -27
  173. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +40 -17
  174. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +33 -44
  175. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +79 -23
  176. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +7 -2
  177. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +11 -1
  178. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +2 -1
  179. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +10 -13
  180. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +27 -7
  181. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +5 -4
  182. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +3 -3
  183. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +1 -1
  184. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +16 -2
  185. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +14 -13
  186. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
  187. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +1 -1
  188. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +2 -2
  189. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +2 -2
  190. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +80 -15
  191. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +1 -1
  192. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +142 -0
  193. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +3 -3
  194. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +18 -10
  195. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +11 -1
  196. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +4 -2
  197. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +25 -19
  198. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +20 -9
  199. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +19 -1
  200. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +5 -3
  201. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +1 -1
  202. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +2 -5
  203. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +1 -1
  204. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
  205. package/node_modules/@types/is-stream/node_modules/@types/node/assert.d.ts +7 -8
  206. package/node_modules/@types/is-stream/node_modules/@types/node/async_hooks.d.ts +2 -2
  207. package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +11 -5
  208. package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +6 -3
  209. package/node_modules/@types/is-stream/node_modules/@types/node/cluster.d.ts +14 -18
  210. package/node_modules/@types/is-stream/node_modules/@types/node/console.d.ts +1 -1
  211. package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +668 -42
  212. package/node_modules/@types/is-stream/node_modules/@types/node/dgram.d.ts +2 -2
  213. package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +2 -1
  214. package/node_modules/@types/is-stream/node_modules/@types/node/dns/promises.d.ts +2 -2
  215. package/node_modules/@types/is-stream/node_modules/@types/node/dns.d.ts +2 -2
  216. package/node_modules/@types/is-stream/node_modules/@types/node/domain.d.ts +3 -2
  217. package/node_modules/@types/is-stream/node_modules/@types/node/events.d.ts +17 -27
  218. package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +40 -17
  219. package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +33 -44
  220. package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +79 -23
  221. package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +7 -2
  222. package/node_modules/@types/is-stream/node_modules/@types/node/https.d.ts +11 -1
  223. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +2 -1
  224. package/node_modules/@types/is-stream/node_modules/@types/node/inspector.d.ts +10 -13
  225. package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +27 -7
  226. package/node_modules/@types/is-stream/node_modules/@types/node/os.d.ts +5 -4
  227. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +3 -3
  228. package/node_modules/@types/is-stream/node_modules/@types/node/path.d.ts +1 -1
  229. package/node_modules/@types/is-stream/node_modules/@types/node/perf_hooks.d.ts +16 -2
  230. package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +14 -13
  231. package/node_modules/@types/is-stream/node_modules/@types/node/punycode.d.ts +1 -1
  232. package/node_modules/@types/is-stream/node_modules/@types/node/querystring.d.ts +1 -1
  233. package/node_modules/@types/is-stream/node_modules/@types/node/readline.d.ts +2 -2
  234. package/node_modules/@types/is-stream/node_modules/@types/node/repl.d.ts +2 -2
  235. package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +80 -15
  236. package/node_modules/@types/is-stream/node_modules/@types/node/string_decoder.d.ts +1 -1
  237. package/node_modules/@types/is-stream/node_modules/@types/node/test.d.ts +142 -0
  238. package/node_modules/@types/is-stream/node_modules/@types/node/timers.d.ts +3 -3
  239. package/node_modules/@types/is-stream/node_modules/@types/node/tls.d.ts +18 -10
  240. package/node_modules/@types/is-stream/node_modules/@types/node/trace_events.d.ts +11 -1
  241. package/node_modules/@types/is-stream/node_modules/@types/node/tty.d.ts +4 -2
  242. package/node_modules/@types/is-stream/node_modules/@types/node/url.d.ts +25 -19
  243. package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +20 -9
  244. package/node_modules/@types/is-stream/node_modules/@types/node/v8.d.ts +19 -1
  245. package/node_modules/@types/is-stream/node_modules/@types/node/vm.d.ts +5 -3
  246. package/node_modules/@types/is-stream/node_modules/@types/node/wasi.d.ts +1 -1
  247. package/node_modules/@types/is-stream/node_modules/@types/node/worker_threads.d.ts +2 -5
  248. package/node_modules/@types/is-stream/node_modules/@types/node/zlib.d.ts +1 -1
  249. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  250. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +7 -8
  251. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +2 -2
  252. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +11 -5
  253. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +6 -3
  254. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +14 -18
  255. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +1 -1
  256. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +668 -42
  257. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +2 -2
  258. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +2 -1
  259. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +2 -2
  260. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +2 -2
  261. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +3 -2
  262. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +17 -27
  263. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +40 -17
  264. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +33 -44
  265. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +79 -23
  266. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +7 -2
  267. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +11 -1
  268. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +2 -1
  269. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +10 -13
  270. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +27 -7
  271. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +5 -4
  272. package/node_modules/@types/keyv/node_modules/@types/node/package.json +3 -3
  273. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +1 -1
  274. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +16 -2
  275. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +14 -13
  276. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
  277. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +1 -1
  278. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +2 -2
  279. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +2 -2
  280. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +80 -15
  281. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +1 -1
  282. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +142 -0
  283. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +3 -3
  284. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +18 -10
  285. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +11 -1
  286. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +4 -2
  287. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +25 -19
  288. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +20 -9
  289. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +19 -1
  290. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +5 -3
  291. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +1 -1
  292. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +2 -5
  293. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +1 -1
  294. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  295. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +7 -8
  296. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +2 -2
  297. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +11 -5
  298. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +6 -3
  299. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +14 -18
  300. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +1 -1
  301. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +668 -42
  302. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +2 -2
  303. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +2 -1
  304. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +2 -2
  305. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +2 -2
  306. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +3 -2
  307. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +17 -27
  308. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +40 -17
  309. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +33 -44
  310. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +79 -23
  311. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +7 -2
  312. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +11 -1
  313. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +2 -1
  314. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +10 -13
  315. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +27 -7
  316. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +5 -4
  317. package/node_modules/@types/responselike/node_modules/@types/node/package.json +3 -3
  318. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +1 -1
  319. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +16 -2
  320. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +14 -13
  321. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
  322. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +1 -1
  323. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +2 -2
  324. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +2 -2
  325. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +80 -15
  326. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +1 -1
  327. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +142 -0
  328. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +3 -3
  329. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +18 -10
  330. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +11 -1
  331. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +4 -2
  332. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +25 -19
  333. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +20 -9
  334. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +19 -1
  335. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +5 -3
  336. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +1 -1
  337. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +2 -5
  338. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +1 -1
  339. package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/buffer-stream.js +0 -0
  340. package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/index.d.ts +0 -0
  341. package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/index.js +0 -0
  342. package/node_modules/{decompress-response/node_modules/mimic-response → cacheable-request/node_modules/get-stream}/license +0 -0
  343. package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/package.json +0 -0
  344. package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/readme.md +0 -0
  345. package/node_modules/clone-response/node_modules/mimic-response/index.js +32 -0
  346. package/node_modules/{get-stream → clone-response/node_modules/mimic-response}/license +1 -1
  347. package/node_modules/clone-response/node_modules/mimic-response/package.json +37 -0
  348. package/node_modules/clone-response/node_modules/mimic-response/readme.md +54 -0
  349. package/node_modules/clone-response/package.json +3 -6
  350. package/node_modules/keyv/README.md +16 -3
  351. package/node_modules/keyv/package.json +6 -8
  352. package/node_modules/keyv/src/index.d.ts +16 -2
  353. package/node_modules/{decompress-response/node_modules/mimic-response → mimic-response}/index.d.ts +0 -0
  354. package/node_modules/mimic-response/index.js +58 -13
  355. package/node_modules/mimic-response/license +1 -1
  356. package/node_modules/mimic-response/package.json +40 -35
  357. package/node_modules/mimic-response/readme.md +33 -9
  358. package/node_modules/responselike/package.json +3 -2
  359. package/package.json +21 -13
  360. package/changelog.md +0 -7
  361. package/lib/codecommit-mirror/index.d.ts.map +0 -1
  362. package/lib/ecs-service-roller/index.d.ts.map +0 -1
  363. package/lib/email-receiver/index.d.ts.map +0 -1
  364. package/lib/email-receiver/receiver.d.ts.map +0 -1
  365. package/lib/email-receiver/s3-function.d.ts.map +0 -1
  366. package/lib/email-receiver/s3.lambda.d.ts.map +0 -1
  367. package/lib/email-receiver/whitelist-function.d.ts.map +0 -1
  368. package/lib/email-receiver/whitelist.lambda.d.ts.map +0 -1
  369. package/lib/index.d.ts.map +0 -1
  370. package/lib/saml-identity-provider/index.d.ts.map +0 -1
  371. package/lib/slack-app/index.d.ts.map +0 -1
  372. package/lib/slack-app/manifest.d.ts.map +0 -1
  373. package/lib/slack-app/provider-function.d.ts.map +0 -1
  374. package/lib/slack-app/provider.d.ts.map +0 -1
  375. package/lib/slack-app/provider.lambda.d.ts.map +0 -1
  376. package/lib/slack-app/slack-app.d.ts.map +0 -1
  377. package/lib/slack-events/events-function.d.ts.map +0 -1
  378. package/lib/slack-events/events.lambda.d.ts.map +0 -1
  379. package/lib/slack-events/index.d.ts.map +0 -1
  380. package/lib/slack-events/signature.d.ts.map +0 -1
  381. package/lib/slack-textract/detect-function.d.ts.map +0 -1
  382. package/lib/slack-textract/detect.lambda.d.ts.map +0 -1
  383. package/lib/slack-textract/index.d.ts.map +0 -1
  384. package/lib/state-machine-cr-provider/index.d.ts.map +0 -1
  385. package/lib/state-machine-cr-provider/runtime/http.d.ts.map +0 -1
  386. package/lib/state-machine-cr-provider/runtime/index.d.ts.map +0 -1
  387. package/lib/static-website/index.d.ts.map +0 -1
  388. package/lib/static-website/origin-request-function.d.ts.map +0 -1
  389. package/lib/static-website/origin-request.edge-lambda.d.ts.map +0 -1
  390. package/lib/toolkit-cleaner/clean-images-function.d.ts.map +0 -1
  391. package/lib/toolkit-cleaner/clean-images.lambda.d.ts.map +0 -1
  392. package/lib/toolkit-cleaner/clean-objects-function.d.ts.map +0 -1
  393. package/lib/toolkit-cleaner/clean-objects.lambda.d.ts.map +0 -1
  394. package/lib/toolkit-cleaner/extract-template-hashes-function.d.ts.map +0 -1
  395. package/lib/toolkit-cleaner/extract-template-hashes.lambda.d.ts.map +0 -1
  396. package/lib/toolkit-cleaner/get-stack-names-function.d.ts.map +0 -1
  397. package/lib/toolkit-cleaner/get-stack-names.lambda.d.ts.map +0 -1
  398. package/lib/toolkit-cleaner/index.d.ts.map +0 -1
  399. package/lib/url-shortener/index.d.ts.map +0 -1
  400. package/lib/url-shortener/redirect-function.d.ts.map +0 -1
  401. package/lib/url-shortener/redirect.edge-lambda.d.ts.map +0 -1
  402. package/lib/url-shortener/shortener-function.d.ts.map +0 -1
  403. package/lib/url-shortener/shortener.lambda.d.ts.map +0 -1
  404. package/node_modules/decompress-response/node_modules/mimic-response/index.js +0 -77
  405. package/node_modules/decompress-response/node_modules/mimic-response/package.json +0 -42
  406. package/node_modules/decompress-response/node_modules/mimic-response/readme.md +0 -78
  407. package/releasetag.txt +0 -1
  408. package/version.txt +0 -1
@@ -13,47 +13,73 @@
13
13
  * // Prints:
14
14
  * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/crypto.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/crypto.js)
17
17
  */
18
18
  declare module 'crypto' {
19
19
  import * as stream from 'node:stream';
20
20
  import { PeerCertificate } from 'node:tls';
21
- interface Certificate {
21
+ /**
22
+ * SPKAC is a Certificate Signing Request mechanism originally implemented by
23
+ * Netscape and was specified formally as part of [HTML5's `keygen` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen).
24
+ *
25
+ * `<keygen>` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
26
+ * should not use this element anymore.
27
+ *
28
+ * The `crypto` module provides the `Certificate` class for working with SPKAC
29
+ * data. The most common usage is handling output generated by the HTML5`<keygen>` element. Node.js uses [OpenSSL's SPKAC
30
+ * implementation](https://www.openssl.org/docs/man1.1.0/apps/openssl-spkac.html) internally.
31
+ * @since v0.11.8
32
+ */
33
+ class Certificate {
22
34
  /**
23
- * @deprecated
24
- * @param spkac
25
- * @returns The challenge component of the `spkac` data structure,
26
- * which includes a public key and a challenge.
35
+ * ```js
36
+ * const { Certificate } = await import('crypto');
37
+ * const spkac = getSpkacSomehow();
38
+ * const challenge = Certificate.exportChallenge(spkac);
39
+ * console.log(challenge.toString('utf8'));
40
+ * // Prints: the challenge as a UTF8 string
41
+ * ```
42
+ * @since v9.0.0
43
+ * @param encoding The `encoding` of the `spkac` string.
44
+ * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
27
45
  */
28
- exportChallenge(spkac: BinaryLike): Buffer;
46
+ static exportChallenge(spkac: BinaryLike): Buffer;
29
47
  /**
30
- * @deprecated
31
- * @param spkac
32
- * @param encoding The encoding of the spkac string.
33
- * @returns The public key component of the `spkac` data structure,
34
- * which includes a public key and a challenge.
48
+ * ```js
49
+ * const { Certificate } = await import('crypto');
50
+ * const spkac = getSpkacSomehow();
51
+ * const publicKey = Certificate.exportPublicKey(spkac);
52
+ * console.log(publicKey);
53
+ * // Prints: the public key as <Buffer ...>
54
+ * ```
55
+ * @since v9.0.0
56
+ * @param encoding The `encoding` of the `spkac` string.
57
+ * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
35
58
  */
36
- exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
59
+ static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
37
60
  /**
38
- * @deprecated
39
- * @param spkac
40
- * @returns `true` if the given `spkac` data structure is valid,
41
- * `false` otherwise.
61
+ * ```js
62
+ * import { Buffer } from 'buffer';
63
+ * const { Certificate } = await import('crypto');
64
+ *
65
+ * const spkac = getSpkacSomehow();
66
+ * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
67
+ * // Prints: true or false
68
+ * ```
69
+ * @since v9.0.0
70
+ * @param encoding The `encoding` of the `spkac` string.
71
+ * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
42
72
  */
43
- verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
44
- }
45
- const Certificate: Certificate & {
46
- /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
47
- new (): Certificate;
48
- /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
49
- (): Certificate;
73
+ static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
50
74
  /**
75
+ * @deprecated
51
76
  * @param spkac
52
77
  * @returns The challenge component of the `spkac` data structure,
53
78
  * which includes a public key and a challenge.
54
79
  */
55
80
  exportChallenge(spkac: BinaryLike): Buffer;
56
81
  /**
82
+ * @deprecated
57
83
  * @param spkac
58
84
  * @param encoding The encoding of the spkac string.
59
85
  * @returns The public key component of the `spkac` data structure,
@@ -61,12 +87,13 @@ declare module 'crypto' {
61
87
  */
62
88
  exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
63
89
  /**
90
+ * @deprecated
64
91
  * @param spkac
65
92
  * @returns `true` if the given `spkac` data structure is valid,
66
93
  * `false` otherwise.
67
94
  */
68
95
  verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
69
- };
96
+ }
70
97
  namespace constants {
71
98
  // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
72
99
  const OPENSSL_VERSION_NUMBER: number;
@@ -172,7 +199,7 @@ declare module 'crypto' {
172
199
  *
173
200
  * The `algorithm` is dependent on the available algorithms supported by the
174
201
  * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
175
- * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will
202
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
176
203
  * display the available digest algorithms.
177
204
  *
178
205
  * Example: generating the sha256 sum of a file
@@ -212,7 +239,7 @@ declare module 'crypto' {
212
239
  *
213
240
  * The `algorithm` is dependent on the available algorithms supported by the
214
241
  * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
215
- * On recent releases of OpenSSL, `openssl list -digest-algorithms`(`openssl list-message-digest-algorithms` for older versions of OpenSSL) will
242
+ * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
216
243
  * display the available digest algorithms.
217
244
  *
218
245
  * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
@@ -662,12 +689,13 @@ declare module 'crypto' {
662
689
  * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
663
690
  *
664
691
  * The `options` argument controls stream behavior and is optional except when a
665
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
692
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
666
693
  * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
667
694
  * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
695
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
668
696
  *
669
697
  * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
670
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
698
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
671
699
  * display the available cipher algorithms.
672
700
  *
673
701
  * The `password` is used to derive the cipher key and initialization vector (IV).
@@ -700,12 +728,13 @@ declare module 'crypto' {
700
728
  * initialization vector (`iv`).
701
729
  *
702
730
  * The `options` argument controls stream behavior and is optional except when a
703
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
731
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
704
732
  * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
705
733
  * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
734
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
706
735
  *
707
736
  * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
708
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
737
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
709
738
  * display the available cipher algorithms.
710
739
  *
711
740
  * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
@@ -925,8 +954,9 @@ declare module 'crypto' {
925
954
  * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
926
955
  *
927
956
  * The `options` argument controls stream behavior and is optional except when a
928
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
957
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
929
958
  * authentication tag in bytes, see `CCM mode`.
959
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
930
960
  *
931
961
  * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
932
962
  * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
@@ -951,12 +981,13 @@ declare module 'crypto' {
951
981
  * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
952
982
  *
953
983
  * The `options` argument controls stream behavior and is optional except when a
954
- * cipher in CCM or OCB mode is used (e.g. `'aes-128-ccm'`). In that case, the`authTagLength` option is required and specifies the length of the
984
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
955
985
  * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
956
986
  * to those with the specified length.
987
+ * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
957
988
  *
958
989
  * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
959
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
990
+ * recent OpenSSL releases, `openssl list -cipher-algorithms` will
960
991
  * display the available cipher algorithms.
961
992
  *
962
993
  * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
@@ -1510,9 +1541,9 @@ declare module 'crypto' {
1510
1541
  * @param inputEncoding The `encoding` of an `otherPublicKey` string.
1511
1542
  * @param outputEncoding The `encoding` of the return value.
1512
1543
  */
1513
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
1514
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
1515
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
1544
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer;
1545
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
1546
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
1516
1547
  computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
1517
1548
  /**
1518
1549
  * Returns the Diffie-Hellman prime in the specified `encoding`.
@@ -1582,6 +1613,36 @@ declare module 'crypto' {
1582
1613
  */
1583
1614
  verifyError: number;
1584
1615
  }
1616
+ /**
1617
+ * The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
1618
+ * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation.
1619
+ * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods.
1620
+ *
1621
+ * ```js
1622
+ * const { createDiffieHellmanGroup } = await import('node:crypto');
1623
+ * const dh = createDiffieHellmanGroup('modp1');
1624
+ * ```
1625
+ * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt):
1626
+ * ```bash
1627
+ * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
1628
+ * modp1 # 768 bits
1629
+ * modp2 # 1024 bits
1630
+ * modp5 # 1536 bits
1631
+ * modp14 # 2048 bits
1632
+ * modp15 # etc.
1633
+ * modp16
1634
+ * modp17
1635
+ * modp18
1636
+ * ```
1637
+ * @since v0.7.5
1638
+ */
1639
+ const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
1640
+ interface DiffieHellmanGroupConstructor {
1641
+ new(name: string): DiffieHellmanGroup;
1642
+ (name: string): DiffieHellmanGroup;
1643
+ readonly prototype: DiffieHellmanGroup;
1644
+ }
1645
+ type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
1585
1646
  /**
1586
1647
  * Creates a predefined `DiffieHellmanGroup` key exchange object. The
1587
1648
  * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`,
@@ -1612,7 +1673,12 @@ declare module 'crypto' {
1612
1673
  * ```
1613
1674
  * @since v0.7.5
1614
1675
  */
1615
- function getDiffieHellman(groupName: string): DiffieHellman;
1676
+ function getDiffieHellman(groupName: string): DiffieHellmanGroup;
1677
+ /**
1678
+ * An alias for {@link getDiffieHellman}
1679
+ * @since v0.9.3
1680
+ */
1681
+ function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
1616
1682
  /**
1617
1683
  * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
1618
1684
  * implementation. A selected HMAC digest algorithm specified by `digest` is
@@ -2094,6 +2160,12 @@ declare module 'crypto' {
2094
2160
  * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
2095
2161
  */
2096
2162
  function getFips(): 1 | 0;
2163
+ /**
2164
+ * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available.
2165
+ * @since v10.0.0
2166
+ * @param bool `true` to enable FIPS mode.
2167
+ */
2168
+ function setFips(bool: boolean): void;
2097
2169
  /**
2098
2170
  * ```js
2099
2171
  * const {
@@ -2272,7 +2344,8 @@ declare module 'crypto' {
2272
2344
  * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
2273
2345
  *
2274
2346
  * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
2275
- * must have the same byte length.
2347
+ * must have the same byte length. An error is thrown if `a` and `b` have
2348
+ * different byte lengths.
2276
2349
  *
2277
2350
  * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
2278
2351
  * entry, such as `Uint16Array`, the result will be computed using the platform
@@ -3094,12 +3167,16 @@ declare module 'crypto' {
3094
3167
  */
3095
3168
  class X509Certificate {
3096
3169
  /**
3097
- * Will be \`true\` if this is a Certificate Authority (ca) certificate.
3170
+ * Will be \`true\` if this is a Certificate Authority (CA) certificate.
3098
3171
  * @since v15.6.0
3099
3172
  */
3100
3173
  readonly ca: boolean;
3101
3174
  /**
3102
3175
  * The SHA-1 fingerprint of this certificate.
3176
+ *
3177
+ * Because SHA-1 is cryptographically broken and because the security of SHA-1 is
3178
+ * significantly worse than that of algorithms that are commonly used to sign
3179
+ * certificates, consider using `x509.fingerprint256` instead.
3103
3180
  * @since v15.6.0
3104
3181
  */
3105
3182
  readonly fingerprint: string;
@@ -3158,6 +3235,10 @@ declare module 'crypto' {
3158
3235
  readonly raw: Buffer;
3159
3236
  /**
3160
3237
  * The serial number of this certificate.
3238
+ *
3239
+ * Serial numbers are assigned by certificate authorities and do not uniquely
3240
+ * identify certificates. Consider using `x509.fingerprint256` as a unique
3241
+ * identifier instead.
3161
3242
  * @since v15.6.0
3162
3243
  */
3163
3244
  readonly serialNumber: string;
@@ -3174,18 +3255,50 @@ declare module 'crypto' {
3174
3255
  constructor(buffer: BinaryLike);
3175
3256
  /**
3176
3257
  * Checks whether the certificate matches the given email address.
3258
+ *
3259
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
3260
+ * subject is only considered if the subject alternative name extension either does
3261
+ * not exist or does not contain any email addresses.
3262
+ *
3263
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
3264
+ * name extension either does not exist or does not contain a matching email
3265
+ * address, the certificate subject is considered.
3266
+ *
3267
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
3268
+ * considered, even if the certificate contains no subject alternative names.
3177
3269
  * @since v15.6.0
3178
3270
  * @return Returns `email` if the certificate matches, `undefined` if it does not.
3179
3271
  */
3180
3272
  checkEmail(email: string, options?: Pick<X509CheckOptions, 'subject'>): string | undefined;
3181
3273
  /**
3182
3274
  * Checks whether the certificate matches the given host name.
3275
+ *
3276
+ * If the certificate matches the given host name, the matching subject name is
3277
+ * returned. The returned name might be an exact match (e.g., `foo.example.com`)
3278
+ * or it might contain wildcards (e.g., `*.example.com`). Because host name
3279
+ * comparisons are case-insensitive, the returned subject name might also differ
3280
+ * from the given `name` in capitalization.
3281
+ *
3282
+ * If the `'subject'` option is undefined or set to `'default'`, the certificate
3283
+ * subject is only considered if the subject alternative name extension either does
3284
+ * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS").
3285
+ *
3286
+ * If the `'subject'` option is set to `'always'` and if the subject alternative
3287
+ * name extension either does not exist or does not contain a matching DNS name,
3288
+ * the certificate subject is considered.
3289
+ *
3290
+ * If the `'subject'` option is set to `'never'`, the certificate subject is never
3291
+ * considered, even if the certificate contains no subject alternative names.
3183
3292
  * @since v15.6.0
3184
- * @return Returns `name` if the certificate matches, `undefined` if it does not.
3293
+ * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`.
3185
3294
  */
3186
3295
  checkHost(name: string, options?: X509CheckOptions): string | undefined;
3187
3296
  /**
3188
3297
  * Checks whether the certificate matches the given IP address (IPv4 or IPv6).
3298
+ *
3299
+ * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they
3300
+ * must match the given `ip` address exactly. Other subject alternative names as
3301
+ * well as the subject field of the certificate are ignored.
3189
3302
  * @since v15.6.0
3190
3303
  * @return Returns `ip` if the certificate matches, `undefined` if it does not.
3191
3304
  */
@@ -3329,8 +3442,521 @@ declare module 'crypto' {
3329
3442
  * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`.
3330
3443
  */
3331
3444
  function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
3445
+ /**
3446
+ * Load and set the `engine` for some or all OpenSSL functions (selected by flags).
3447
+ *
3448
+ * `engine` could be either an id or a path to the engine's shared library.
3449
+ *
3450
+ * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default.
3451
+ * The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`):
3452
+ *
3453
+ * - `crypto.constants.ENGINE_METHOD_RSA`
3454
+ * - `crypto.constants.ENGINE_METHOD_DSA`
3455
+ * - `crypto.constants.ENGINE_METHOD_DH`
3456
+ * - `crypto.constants.ENGINE_METHOD_RAND`
3457
+ * - `crypto.constants.ENGINE_METHOD_EC`
3458
+ * - `crypto.constants.ENGINE_METHOD_CIPHERS`
3459
+ * - `crypto.constants.ENGINE_METHOD_DIGESTS`
3460
+ * - `crypto.constants.ENGINE_METHOD_PKEY_METHS`
3461
+ * - `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS`
3462
+ * - `crypto.constants.ENGINE_METHOD_ALL`
3463
+ * - `crypto.constants.ENGINE_METHOD_NONE`
3464
+ *
3465
+ * The flags below are deprecated in OpenSSL-1.1.0.
3466
+ *
3467
+ * - `crypto.constants.ENGINE_METHOD_ECDH`
3468
+ * - `crypto.constants.ENGINE_METHOD_ECDSA`
3469
+ * - `crypto.constants.ENGINE_METHOD_STORE`
3470
+ * @since v0.11.11
3471
+ * @param [flags=crypto.constants.ENGINE_METHOD_ALL]
3472
+ */
3473
+ function setEngine(engine: string, flags?: number): void;
3474
+ /**
3475
+ * A convenient alias for `crypto.webcrypto.getRandomValues()`.
3476
+ * This implementation is not compliant with the Web Crypto spec,
3477
+ * to write web-compatible code use `crypto.webcrypto.getRandomValues()` instead.
3478
+ * @since v17.4.0
3479
+ * @returns Returns `typedArray`.
3480
+ */
3481
+ function getRandomValues<T extends webcrypto.BufferSource>(typedArray: T): T;
3482
+ /**
3483
+ * A convenient alias for `crypto.webcrypto.subtle`.
3484
+ * @since v17.4.0
3485
+ */
3486
+ const subtle: webcrypto.SubtleCrypto;
3487
+ /**
3488
+ * An implementation of the Web Crypto API standard.
3489
+ *
3490
+ * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details.
3491
+ * @since v15.0.0
3492
+ */
3493
+ const webcrypto: webcrypto.Crypto;
3332
3494
  namespace webcrypto {
3333
- class CryptoKey {} // placeholder
3495
+ type BufferSource = ArrayBufferView | ArrayBuffer;
3496
+ type KeyFormat = 'jwk' | 'pkcs8' | 'raw' | 'spki';
3497
+ type KeyType = 'private' | 'public' | 'secret';
3498
+ type KeyUsage = 'decrypt' | 'deriveBits' | 'deriveKey' | 'encrypt' | 'sign' | 'unwrapKey' | 'verify' | 'wrapKey';
3499
+ type AlgorithmIdentifier = Algorithm | string;
3500
+ type HashAlgorithmIdentifier = AlgorithmIdentifier;
3501
+ type NamedCurve = string;
3502
+ type BigInteger = Uint8Array;
3503
+ interface AesCbcParams extends Algorithm {
3504
+ iv: BufferSource;
3505
+ }
3506
+ interface AesCtrParams extends Algorithm {
3507
+ counter: BufferSource;
3508
+ length: number;
3509
+ }
3510
+ interface AesDerivedKeyParams extends Algorithm {
3511
+ length: number;
3512
+ }
3513
+ interface AesGcmParams extends Algorithm {
3514
+ additionalData?: BufferSource;
3515
+ iv: BufferSource;
3516
+ tagLength?: number;
3517
+ }
3518
+ interface AesKeyAlgorithm extends KeyAlgorithm {
3519
+ length: number;
3520
+ }
3521
+ interface AesKeyGenParams extends Algorithm {
3522
+ length: number;
3523
+ }
3524
+ interface Algorithm {
3525
+ name: string;
3526
+ }
3527
+ interface EcKeyAlgorithm extends KeyAlgorithm {
3528
+ namedCurve: NamedCurve;
3529
+ }
3530
+ interface EcKeyGenParams extends Algorithm {
3531
+ namedCurve: NamedCurve;
3532
+ }
3533
+ interface EcKeyImportParams extends Algorithm {
3534
+ namedCurve: NamedCurve;
3535
+ }
3536
+ interface EcdhKeyDeriveParams extends Algorithm {
3537
+ public: CryptoKey;
3538
+ }
3539
+ interface EcdsaParams extends Algorithm {
3540
+ hash: HashAlgorithmIdentifier;
3541
+ }
3542
+ interface Ed448Params extends Algorithm {
3543
+ context?: BufferSource;
3544
+ }
3545
+ interface HkdfParams extends Algorithm {
3546
+ hash: HashAlgorithmIdentifier;
3547
+ info: BufferSource;
3548
+ salt: BufferSource;
3549
+ }
3550
+ interface HmacImportParams extends Algorithm {
3551
+ hash: HashAlgorithmIdentifier;
3552
+ length?: number;
3553
+ }
3554
+ interface HmacKeyAlgorithm extends KeyAlgorithm {
3555
+ hash: KeyAlgorithm;
3556
+ length: number;
3557
+ }
3558
+ interface HmacKeyGenParams extends Algorithm {
3559
+ hash: HashAlgorithmIdentifier;
3560
+ length?: number;
3561
+ }
3562
+ interface JsonWebKey {
3563
+ alg?: string;
3564
+ crv?: string;
3565
+ d?: string;
3566
+ dp?: string;
3567
+ dq?: string;
3568
+ e?: string;
3569
+ ext?: boolean;
3570
+ k?: string;
3571
+ key_ops?: string[];
3572
+ kty?: string;
3573
+ n?: string;
3574
+ oth?: RsaOtherPrimesInfo[];
3575
+ p?: string;
3576
+ q?: string;
3577
+ qi?: string;
3578
+ use?: string;
3579
+ x?: string;
3580
+ y?: string;
3581
+ }
3582
+ interface KeyAlgorithm {
3583
+ name: string;
3584
+ }
3585
+ interface Pbkdf2Params extends Algorithm {
3586
+ hash: HashAlgorithmIdentifier;
3587
+ iterations: number;
3588
+ salt: BufferSource;
3589
+ }
3590
+ interface RsaHashedImportParams extends Algorithm {
3591
+ hash: HashAlgorithmIdentifier;
3592
+ }
3593
+ interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
3594
+ hash: KeyAlgorithm;
3595
+ }
3596
+ interface RsaHashedKeyGenParams extends RsaKeyGenParams {
3597
+ hash: HashAlgorithmIdentifier;
3598
+ }
3599
+ interface RsaKeyAlgorithm extends KeyAlgorithm {
3600
+ modulusLength: number;
3601
+ publicExponent: BigInteger;
3602
+ }
3603
+ interface RsaKeyGenParams extends Algorithm {
3604
+ modulusLength: number;
3605
+ publicExponent: BigInteger;
3606
+ }
3607
+ interface RsaOaepParams extends Algorithm {
3608
+ label?: BufferSource;
3609
+ }
3610
+ interface RsaOtherPrimesInfo {
3611
+ d?: string;
3612
+ r?: string;
3613
+ t?: string;
3614
+ }
3615
+ interface RsaPssParams extends Algorithm {
3616
+ saltLength: number;
3617
+ }
3618
+ /**
3619
+ * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class.
3620
+ * `Crypto` is a singleton that provides access to the remainder of the crypto API.
3621
+ * @since v15.0.0
3622
+ */
3623
+ interface Crypto {
3624
+ /**
3625
+ * Provides access to the `SubtleCrypto` API.
3626
+ * @since v15.0.0
3627
+ */
3628
+ readonly subtle: SubtleCrypto;
3629
+ /**
3630
+ * Generates cryptographically strong random values.
3631
+ * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned.
3632
+ *
3633
+ * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted.
3634
+ *
3635
+ * An error will be thrown if the given `typedArray` is larger than 65,536 bytes.
3636
+ * @since v15.0.0
3637
+ */
3638
+ getRandomValues<T extends Exclude<NodeJS.TypedArray, Float32Array | Float64Array>>(typedArray: T): T;
3639
+ /**
3640
+ * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID.
3641
+ * The UUID is generated using a cryptographic pseudorandom number generator.
3642
+ * @since v16.7.0
3643
+ */
3644
+ randomUUID(): string;
3645
+ CryptoKey: CryptoKeyConstructor;
3646
+ }
3647
+ // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable.
3648
+ interface CryptoKeyConstructor {
3649
+ /** Illegal constructor */
3650
+ (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user.
3651
+ readonly length: 0;
3652
+ readonly name: 'CryptoKey';
3653
+ readonly prototype: CryptoKey;
3654
+ }
3655
+ /**
3656
+ * @since v15.0.0
3657
+ */
3658
+ interface CryptoKey {
3659
+ /**
3660
+ * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters.
3661
+ * @since v15.0.0
3662
+ */
3663
+ readonly algorithm: KeyAlgorithm;
3664
+ /**
3665
+ * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`.
3666
+ * @since v15.0.0
3667
+ */
3668
+ readonly extractable: boolean;
3669
+ /**
3670
+ * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key.
3671
+ * @since v15.0.0
3672
+ */
3673
+ readonly type: KeyType;
3674
+ /**
3675
+ * An array of strings identifying the operations for which the key may be used.
3676
+ *
3677
+ * The possible usages are:
3678
+ * - `'encrypt'` - The key may be used to encrypt data.
3679
+ * - `'decrypt'` - The key may be used to decrypt data.
3680
+ * - `'sign'` - The key may be used to generate digital signatures.
3681
+ * - `'verify'` - The key may be used to verify digital signatures.
3682
+ * - `'deriveKey'` - The key may be used to derive a new key.
3683
+ * - `'deriveBits'` - The key may be used to derive bits.
3684
+ * - `'wrapKey'` - The key may be used to wrap another key.
3685
+ * - `'unwrapKey'` - The key may be used to unwrap another key.
3686
+ *
3687
+ * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`).
3688
+ * @since v15.0.0
3689
+ */
3690
+ readonly usages: KeyUsage[];
3691
+ }
3692
+ /**
3693
+ * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair.
3694
+ * @since v15.0.0
3695
+ */
3696
+ interface CryptoKeyPair {
3697
+ /**
3698
+ * A {@link CryptoKey} whose type will be `'private'`.
3699
+ * @since v15.0.0
3700
+ */
3701
+ privateKey: CryptoKey;
3702
+ /**
3703
+ * A {@link CryptoKey} whose type will be `'public'`.
3704
+ * @since v15.0.0
3705
+ */
3706
+ publicKey: CryptoKey;
3707
+ }
3708
+ /**
3709
+ * @since v15.0.0
3710
+ */
3711
+ interface SubtleCrypto {
3712
+ /**
3713
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `key`,
3714
+ * `subtle.decrypt()` attempts to decipher the provided `data`. If successful,
3715
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the plaintext result.
3716
+ *
3717
+ * The algorithms currently supported include:
3718
+ *
3719
+ * - `'RSA-OAEP'`
3720
+ * - `'AES-CTR'`
3721
+ * - `'AES-CBC'`
3722
+ * - `'AES-GCM'`
3723
+ * @since v15.0.0
3724
+ */
3725
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
3726
+ /**
3727
+ * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
3728
+ * `subtle.deriveBits()` attempts to generate `length` bits.
3729
+ * The Node.js implementation requires that `length` is a multiple of `8`.
3730
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the generated data.
3731
+ *
3732
+ * The algorithms currently supported include:
3733
+ *
3734
+ * - `'ECDH'`
3735
+ * - `'X25519'`
3736
+ * - `'X448'`
3737
+ * - `'HKDF'`
3738
+ * - `'PBKDF2'`
3739
+ * @since v15.0.0
3740
+ */
3741
+ deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
3742
+ /**
3743
+ * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
3744
+ * `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
3745
+ *
3746
+ * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material,
3747
+ * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input.
3748
+ *
3749
+ * The algorithms currently supported include:
3750
+ *
3751
+ * - `'ECDH'`
3752
+ * - `'X25519'`
3753
+ * - `'X448'`
3754
+ * - `'HKDF'`
3755
+ * - `'PBKDF2'`
3756
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
3757
+ * @since v15.0.0
3758
+ */
3759
+ deriveKey(
3760
+ algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
3761
+ baseKey: CryptoKey,
3762
+ derivedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params,
3763
+ extractable: boolean,
3764
+ keyUsages: ReadonlyArray<KeyUsage>
3765
+ ): Promise<CryptoKey>;
3766
+ /**
3767
+ * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`.
3768
+ * If successful, the returned promise is resolved with an `<ArrayBuffer>` containing the computed digest.
3769
+ *
3770
+ * If `algorithm` is provided as a `<string>`, it must be one of:
3771
+ *
3772
+ * - `'SHA-1'`
3773
+ * - `'SHA-256'`
3774
+ * - `'SHA-384'`
3775
+ * - `'SHA-512'`
3776
+ *
3777
+ * If `algorithm` is provided as an `<Object>`, it must have a `name` property whose value is one of the above.
3778
+ * @since v15.0.0
3779
+ */
3780
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
3781
+ /**
3782
+ * Using the method and parameters specified by `algorithm` and the keying material provided by `key`,
3783
+ * `subtle.encrypt()` attempts to encipher `data`. If successful,
3784
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the encrypted result.
3785
+ *
3786
+ * The algorithms currently supported include:
3787
+ *
3788
+ * - `'RSA-OAEP'`
3789
+ * - `'AES-CTR'`
3790
+ * - `'AES-CBC'`
3791
+ * - `'AES-GCM'`
3792
+ * @since v15.0.0
3793
+ */
3794
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
3795
+ /**
3796
+ * Exports the given key into the specified format, if supported.
3797
+ *
3798
+ * If the `<CryptoKey>` is not extractable, the returned promise will reject.
3799
+ *
3800
+ * When `format` is either `'pkcs8'` or `'spki'` and the export is successful,
3801
+ * the returned promise will be resolved with an `<ArrayBuffer>` containing the exported key data.
3802
+ *
3803
+ * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a
3804
+ * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification.
3805
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
3806
+ * @returns `<Promise>` containing `<ArrayBuffer>`.
3807
+ * @since v15.0.0
3808
+ */
3809
+ exportKey(format: 'jwk', key: CryptoKey): Promise<JsonWebKey>;
3810
+ exportKey(format: Exclude<KeyFormat, 'jwk'>, key: CryptoKey): Promise<ArrayBuffer>;
3811
+ /**
3812
+ * Using the method and parameters provided in `algorithm`,
3813
+ * `subtle.generateKey()` attempts to generate new keying material.
3814
+ * Depending the method used, the method may generate either a single `<CryptoKey>` or a `<CryptoKeyPair>`.
3815
+ *
3816
+ * The `<CryptoKeyPair>` (public and private key) generating algorithms supported include:
3817
+ *
3818
+ * - `'RSASSA-PKCS1-v1_5'`
3819
+ * - `'RSA-PSS'`
3820
+ * - `'RSA-OAEP'`
3821
+ * - `'ECDSA'`
3822
+ * - `'Ed25519'`
3823
+ * - `'Ed448'`
3824
+ * - `'ECDH'`
3825
+ * - `'X25519'`
3826
+ * - `'X448'`
3827
+ * The `<CryptoKey>` (secret key) generating algorithms supported include:
3828
+ *
3829
+ * - `'HMAC'`
3830
+ * - `'AES-CTR'`
3831
+ * - `'AES-CBC'`
3832
+ * - `'AES-GCM'`
3833
+ * - `'AES-KW'`
3834
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
3835
+ * @since v15.0.0
3836
+ */
3837
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
3838
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
3839
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
3840
+ /**
3841
+ * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
3842
+ * to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
3843
+ * If the import is successful, the returned promise will be resolved with the created `<CryptoKey>`.
3844
+ *
3845
+ * If importing a `'PBKDF2'` key, `extractable` must be `false`.
3846
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
3847
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
3848
+ * @since v15.0.0
3849
+ */
3850
+ importKey(
3851
+ format: 'jwk',
3852
+ keyData: JsonWebKey,
3853
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
3854
+ extractable: boolean,
3855
+ keyUsages: ReadonlyArray<KeyUsage>
3856
+ ): Promise<CryptoKey>;
3857
+ importKey(
3858
+ format: Exclude<KeyFormat, 'jwk'>,
3859
+ keyData: BufferSource,
3860
+ algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
3861
+ extractable: boolean,
3862
+ keyUsages: KeyUsage[]
3863
+ ): Promise<CryptoKey>;
3864
+ /**
3865
+ * Using the method and parameters given by `algorithm` and the keying material provided by `key`,
3866
+ * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful,
3867
+ * the returned promise is resolved with an `<ArrayBuffer>` containing the generated signature.
3868
+ *
3869
+ * The algorithms currently supported include:
3870
+ *
3871
+ * - `'RSASSA-PKCS1-v1_5'`
3872
+ * - `'RSA-PSS'`
3873
+ * - `'ECDSA'`
3874
+ * - `'Ed25519'`
3875
+ * - `'Ed448'`
3876
+ * - `'HMAC'`
3877
+ * @since v15.0.0
3878
+ */
3879
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
3880
+ /**
3881
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
3882
+ * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
3883
+ * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input)
3884
+ * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs.
3885
+ * If successful, the returned promise is resolved with a `<CryptoKey>` object.
3886
+ *
3887
+ * The wrapping algorithms currently supported include:
3888
+ *
3889
+ * - `'RSA-OAEP'`
3890
+ * - `'AES-CTR'`
3891
+ * - `'AES-CBC'`
3892
+ * - `'AES-GCM'`
3893
+ * - `'AES-KW'`
3894
+ *
3895
+ * The unwrapped key algorithms supported include:
3896
+ *
3897
+ * - `'RSASSA-PKCS1-v1_5'`
3898
+ * - `'RSA-PSS'`
3899
+ * - `'RSA-OAEP'`
3900
+ * - `'ECDSA'`
3901
+ * - `'Ed25519'`
3902
+ * - `'Ed448'`
3903
+ * - `'ECDH'`
3904
+ * - `'X25519'`
3905
+ * - `'X448'`
3906
+ * - `'HMAC'`
3907
+ * - `'AES-CTR'`
3908
+ * - `'AES-CBC'`
3909
+ * - `'AES-GCM'`
3910
+ * - `'AES-KW'`
3911
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
3912
+ * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
3913
+ * @since v15.0.0
3914
+ */
3915
+ unwrapKey(
3916
+ format: KeyFormat,
3917
+ wrappedKey: BufferSource,
3918
+ unwrappingKey: CryptoKey,
3919
+ unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,
3920
+ unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm,
3921
+ extractable: boolean,
3922
+ keyUsages: KeyUsage[]
3923
+ ): Promise<CryptoKey>;
3924
+ /**
3925
+ * Using the method and parameters given in `algorithm` and the keying material provided by `key`,
3926
+ * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`.
3927
+ * The returned promise is resolved with either `true` or `false`.
3928
+ *
3929
+ * The algorithms currently supported include:
3930
+ *
3931
+ * - `'RSASSA-PKCS1-v1_5'`
3932
+ * - `'RSA-PSS'`
3933
+ * - `'ECDSA'`
3934
+ * - `'Ed25519'`
3935
+ * - `'Ed448'`
3936
+ * - `'HMAC'`
3937
+ * @since v15.0.0
3938
+ */
3939
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
3940
+ /**
3941
+ * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
3942
+ * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
3943
+ * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`.
3944
+ * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments,
3945
+ * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs.
3946
+ * If successful, the returned promise will be resolved with an `<ArrayBuffer>` containing the encrypted key data.
3947
+ *
3948
+ * The wrapping algorithms currently supported include:
3949
+ *
3950
+ * - `'RSA-OAEP'`
3951
+ * - `'AES-CTR'`
3952
+ * - `'AES-CBC'`
3953
+ * - `'AES-GCM'`
3954
+ * - `'AES-KW'`
3955
+ * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`.
3956
+ * @since v15.0.0
3957
+ */
3958
+ wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
3959
+ }
3334
3960
  }
3335
3961
  }
3336
3962
  declare module 'node:crypto' {