@openclaw/whatsapp 2026.5.24-beta.2 → 2026.5.26-beta.1

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 (2141) hide show
  1. package/dist/{access-control-p_vcYDW7.js → access-control-otOXu5WK.js} +1 -1
  2. package/dist/{accounts-BPYgj8Fv.js → accounts-B3diVrr6.js} +2 -1
  3. package/dist/{action-runtime-DGx8vCsS.js → action-runtime-PNEpb1qb.js} +3 -3
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/action-runtime.runtime.js +1 -1
  6. package/dist/api.js +9 -9
  7. package/dist/{approval-handler.runtime-j8U6lgcp.js → approval-handler.runtime-GXmnPxiL.js} +1 -1
  8. package/dist/{channel-DOxZCBxE.js → channel-DkT2UI4n.js} +8 -8
  9. package/dist/channel-plugin-api.js +1 -1
  10. package/dist/{channel-react-action-O7asbQQ1.js → channel-react-action-61jg4cjy.js} +3 -3
  11. package/dist/{channel.runtime-B0cFknwD.js → channel.runtime-BAdyJSMT.js} +3 -3
  12. package/dist/{channel.setup-Bk7Hmp4a.js → channel.setup-DFASG1fi.js} +2 -1
  13. package/dist/contract-api.js +1 -1
  14. package/dist/group-config-path-BGyzT9Lg.js +54 -0
  15. package/dist/{login-BEkrpJbZ.js → login-CympQtg8.js} +1 -1
  16. package/dist/{login-qr-BVRx8j_M.js → login-qr-RCP3gu1G.js} +1 -1
  17. package/dist/login-qr-runtime.js +1 -1
  18. package/dist/{monitor-BU1ydkuF.js → monitor-CdeM6e28.js} +56 -12
  19. package/dist/{outbound-adapter-BObZXXzU.js → outbound-adapter-76p0VEXd.js} +5 -4
  20. package/dist/{outbound-base-E84SMkd9.js → outbound-base-DwCUu3ab.js} +1 -1
  21. package/dist/{outbound-media-contract-ioTkt8tn.js → outbound-media-contract-CA2OGvjJ.js} +2 -2
  22. package/dist/outbound-payload-test-api.js +1 -1
  23. package/dist/{resolve-outbound-target-CV-iBmSG.js → resolve-outbound-target-CcdugbDf.js} +2 -1
  24. package/dist/runtime-api.js +5 -5
  25. package/dist/{send-C9jEw6hx.js → send-CAQrir3g.js} +2 -2
  26. package/dist/{send-api-CC-vHBWG.js → send-api-C3EWzdzp.js} +38 -9
  27. package/dist/{setup-core-Ce-b_wzQ.js → setup-core-B_fDLMkf.js} +9 -35
  28. package/dist/{setup-finalize-BqOudqJw.js → setup-finalize-CwUDT0HD.js} +3 -3
  29. package/dist/setup-plugin-api.js +1 -1
  30. package/dist/{setup-surface-CAchPwW5.js → setup-surface-C4R54NEZ.js} +2 -2
  31. package/dist/test-api.js +1 -1
  32. package/node_modules/@thi.ng/bitstream/package.json +3 -3
  33. package/node_modules/@thi.ng/errors/package.json +2 -2
  34. package/node_modules/ws/lib/receiver.js +54 -0
  35. package/node_modules/ws/lib/websocket-server.js +8 -0
  36. package/node_modules/ws/lib/websocket.js +14 -0
  37. package/node_modules/ws/package.json +1 -1
  38. package/npm-shrinkwrap.json +16 -1207
  39. package/package.json +4 -6
  40. package/node_modules/@jimp/core/.tshy/build.json +0 -8
  41. package/node_modules/@jimp/core/.tshy/commonjs.json +0 -17
  42. package/node_modules/@jimp/core/.tshy/esm.json +0 -16
  43. package/node_modules/@jimp/core/.turbo/turbo-build.log +0 -5
  44. package/node_modules/@jimp/core/CHANGELOG.md +0 -164
  45. package/node_modules/@jimp/core/LICENSE +0 -21
  46. package/node_modules/@jimp/core/dist/commonjs/index.d.ts +0 -1904
  47. package/node_modules/@jimp/core/dist/commonjs/index.d.ts.map +0 -1
  48. package/node_modules/@jimp/core/dist/commonjs/index.js +0 -534
  49. package/node_modules/@jimp/core/dist/commonjs/index.js.map +0 -1
  50. package/node_modules/@jimp/core/dist/commonjs/package.json +0 -3
  51. package/node_modules/@jimp/core/dist/commonjs/utils/composite-modes.d.ts +0 -70
  52. package/node_modules/@jimp/core/dist/commonjs/utils/composite-modes.d.ts.map +0 -1
  53. package/node_modules/@jimp/core/dist/commonjs/utils/composite-modes.js +0 -236
  54. package/node_modules/@jimp/core/dist/commonjs/utils/composite-modes.js.map +0 -1
  55. package/node_modules/@jimp/core/dist/commonjs/utils/composite.d.ts +0 -8
  56. package/node_modules/@jimp/core/dist/commonjs/utils/composite.d.ts.map +0 -1
  57. package/node_modules/@jimp/core/dist/commonjs/utils/composite.js +0 -82
  58. package/node_modules/@jimp/core/dist/commonjs/utils/composite.js.map +0 -1
  59. package/node_modules/@jimp/core/dist/commonjs/utils/constants.d.ts +0 -85
  60. package/node_modules/@jimp/core/dist/commonjs/utils/constants.d.ts.map +0 -1
  61. package/node_modules/@jimp/core/dist/commonjs/utils/constants.js +0 -93
  62. package/node_modules/@jimp/core/dist/commonjs/utils/constants.js.map +0 -1
  63. package/node_modules/@jimp/core/dist/commonjs/utils/image-bitmap.d.ts +0 -11
  64. package/node_modules/@jimp/core/dist/commonjs/utils/image-bitmap.d.ts.map +0 -1
  65. package/node_modules/@jimp/core/dist/commonjs/utils/image-bitmap.js +0 -129
  66. package/node_modules/@jimp/core/dist/commonjs/utils/image-bitmap.js.map +0 -1
  67. package/node_modules/@jimp/core/dist/commonjs/utils/mime.d.ts +0 -2
  68. package/node_modules/@jimp/core/dist/commonjs/utils/mime.d.ts.map +0 -1
  69. package/node_modules/@jimp/core/dist/commonjs/utils/mime.js +0 -30
  70. package/node_modules/@jimp/core/dist/commonjs/utils/mime.js.map +0 -1
  71. package/node_modules/@jimp/core/dist/esm/index.d.ts +0 -1904
  72. package/node_modules/@jimp/core/dist/esm/index.d.ts.map +0 -1
  73. package/node_modules/@jimp/core/dist/esm/index.js +0 -511
  74. package/node_modules/@jimp/core/dist/esm/index.js.map +0 -1
  75. package/node_modules/@jimp/core/dist/esm/package.json +0 -3
  76. package/node_modules/@jimp/core/dist/esm/utils/composite-modes.d.ts +0 -70
  77. package/node_modules/@jimp/core/dist/esm/utils/composite-modes.d.ts.map +0 -1
  78. package/node_modules/@jimp/core/dist/esm/utils/composite-modes.js +0 -222
  79. package/node_modules/@jimp/core/dist/esm/utils/composite-modes.js.map +0 -1
  80. package/node_modules/@jimp/core/dist/esm/utils/composite.d.ts +0 -8
  81. package/node_modules/@jimp/core/dist/esm/utils/composite.d.ts.map +0 -1
  82. package/node_modules/@jimp/core/dist/esm/utils/composite.js +0 -56
  83. package/node_modules/@jimp/core/dist/esm/utils/composite.js.map +0 -1
  84. package/node_modules/@jimp/core/dist/esm/utils/constants.d.ts +0 -85
  85. package/node_modules/@jimp/core/dist/esm/utils/constants.d.ts.map +0 -1
  86. package/node_modules/@jimp/core/dist/esm/utils/constants.js +0 -90
  87. package/node_modules/@jimp/core/dist/esm/utils/constants.js.map +0 -1
  88. package/node_modules/@jimp/core/dist/esm/utils/image-bitmap.d.ts +0 -11
  89. package/node_modules/@jimp/core/dist/esm/utils/image-bitmap.d.ts.map +0 -1
  90. package/node_modules/@jimp/core/dist/esm/utils/image-bitmap.js +0 -122
  91. package/node_modules/@jimp/core/dist/esm/utils/image-bitmap.js.map +0 -1
  92. package/node_modules/@jimp/core/dist/esm/utils/mime.d.ts +0 -2
  93. package/node_modules/@jimp/core/dist/esm/utils/mime.d.ts.map +0 -1
  94. package/node_modules/@jimp/core/dist/esm/utils/mime.js +0 -29
  95. package/node_modules/@jimp/core/dist/esm/utils/mime.js.map +0 -1
  96. package/node_modules/@jimp/core/eslint.config.mjs +0 -9
  97. package/node_modules/@jimp/core/package.json +0 -69
  98. package/node_modules/@jimp/core/src/index.ts +0 -785
  99. package/node_modules/@jimp/core/src/utils/composite-modes.ts +0 -308
  100. package/node_modules/@jimp/core/src/utils/composite.ts +0 -85
  101. package/node_modules/@jimp/core/src/utils/constants.ts +0 -88
  102. package/node_modules/@jimp/core/src/utils/exif-parser.d.ts +0 -13
  103. package/node_modules/@jimp/core/src/utils/image-bitmap.ts +0 -153
  104. package/node_modules/@jimp/core/src/utils/mime.ts +0 -34
  105. package/node_modules/@jimp/core/tsconfig.json +0 -6
  106. package/node_modules/@jimp/diff/.tshy/build.json +0 -8
  107. package/node_modules/@jimp/diff/.tshy/commonjs.json +0 -17
  108. package/node_modules/@jimp/diff/.tshy/esm.json +0 -16
  109. package/node_modules/@jimp/diff/.turbo/turbo-build.log +0 -5
  110. package/node_modules/@jimp/diff/CHANGELOG.md +0 -63
  111. package/node_modules/@jimp/diff/LICENSE +0 -21
  112. package/node_modules/@jimp/diff/dist/commonjs/index.d.ts +0 -27
  113. package/node_modules/@jimp/diff/dist/commonjs/index.d.ts.map +0 -1
  114. package/node_modules/@jimp/diff/dist/commonjs/index.js +0 -65
  115. package/node_modules/@jimp/diff/dist/commonjs/index.js.map +0 -1
  116. package/node_modules/@jimp/diff/dist/commonjs/package.json +0 -3
  117. package/node_modules/@jimp/diff/dist/esm/index.d.ts +0 -27
  118. package/node_modules/@jimp/diff/dist/esm/index.d.ts.map +0 -1
  119. package/node_modules/@jimp/diff/dist/esm/index.js +0 -59
  120. package/node_modules/@jimp/diff/dist/esm/index.js.map +0 -1
  121. package/node_modules/@jimp/diff/dist/esm/package.json +0 -3
  122. package/node_modules/@jimp/diff/eslint.config.mjs +0 -2
  123. package/node_modules/@jimp/diff/package.json +0 -65
  124. package/node_modules/@jimp/diff/src/__snapshots__/index.test.ts.snap +0 -49
  125. package/node_modules/@jimp/diff/src/index.test.ts +0 -56
  126. package/node_modules/@jimp/diff/src/index.ts +0 -71
  127. package/node_modules/@jimp/diff/tsconfig.json +0 -6
  128. package/node_modules/@jimp/file-ops/.tshy/browser.json +0 -16
  129. package/node_modules/@jimp/file-ops/.tshy/build.json +0 -8
  130. package/node_modules/@jimp/file-ops/.tshy/commonjs.json +0 -18
  131. package/node_modules/@jimp/file-ops/.tshy/esm.json +0 -17
  132. package/node_modules/@jimp/file-ops/.turbo/turbo-build.log +0 -5
  133. package/node_modules/@jimp/file-ops/CHANGELOG.md +0 -51
  134. package/node_modules/@jimp/file-ops/LICENSE +0 -21
  135. package/node_modules/@jimp/file-ops/dist/browser/index-browser.d.mts.map +0 -1
  136. package/node_modules/@jimp/file-ops/dist/browser/index-browser.mjs.map +0 -1
  137. package/node_modules/@jimp/file-ops/dist/browser/index.d.ts +0 -4
  138. package/node_modules/@jimp/file-ops/dist/browser/index.js +0 -8
  139. package/node_modules/@jimp/file-ops/dist/browser/package.json +0 -3
  140. package/node_modules/@jimp/file-ops/dist/commonjs/index.d.ts +0 -5
  141. package/node_modules/@jimp/file-ops/dist/commonjs/index.d.ts.map +0 -1
  142. package/node_modules/@jimp/file-ops/dist/commonjs/index.js +0 -9
  143. package/node_modules/@jimp/file-ops/dist/commonjs/index.js.map +0 -1
  144. package/node_modules/@jimp/file-ops/dist/commonjs/package.json +0 -3
  145. package/node_modules/@jimp/file-ops/dist/esm/index.d.ts +0 -5
  146. package/node_modules/@jimp/file-ops/dist/esm/index.d.ts.map +0 -1
  147. package/node_modules/@jimp/file-ops/dist/esm/index.js +0 -5
  148. package/node_modules/@jimp/file-ops/dist/esm/index.js.map +0 -1
  149. package/node_modules/@jimp/file-ops/dist/esm/package.json +0 -3
  150. package/node_modules/@jimp/file-ops/eslint.config.mjs +0 -2
  151. package/node_modules/@jimp/file-ops/package.json +0 -63
  152. package/node_modules/@jimp/file-ops/src/index-browser.mts +0 -9
  153. package/node_modules/@jimp/file-ops/src/index.ts +0 -5
  154. package/node_modules/@jimp/file-ops/tsconfig.json +0 -6
  155. package/node_modules/@jimp/js-bmp/.tshy/build.json +0 -8
  156. package/node_modules/@jimp/js-bmp/.tshy/commonjs.json +0 -17
  157. package/node_modules/@jimp/js-bmp/.tshy/esm.json +0 -16
  158. package/node_modules/@jimp/js-bmp/.turbo/turbo-build.log +0 -5
  159. package/node_modules/@jimp/js-bmp/CHANGELOG.md +0 -73
  160. package/node_modules/@jimp/js-bmp/LICENSE +0 -21
  161. package/node_modules/@jimp/js-bmp/README.md +0 -6
  162. package/node_modules/@jimp/js-bmp/dist/commonjs/index.d.ts +0 -24
  163. package/node_modules/@jimp/js-bmp/dist/commonjs/index.d.ts.map +0 -1
  164. package/node_modules/@jimp/js-bmp/dist/commonjs/index.js +0 -74
  165. package/node_modules/@jimp/js-bmp/dist/commonjs/index.js.map +0 -1
  166. package/node_modules/@jimp/js-bmp/dist/commonjs/package.json +0 -3
  167. package/node_modules/@jimp/js-bmp/dist/esm/index.d.ts +0 -24
  168. package/node_modules/@jimp/js-bmp/dist/esm/index.d.ts.map +0 -1
  169. package/node_modules/@jimp/js-bmp/dist/esm/index.js +0 -45
  170. package/node_modules/@jimp/js-bmp/dist/esm/index.js.map +0 -1
  171. package/node_modules/@jimp/js-bmp/dist/esm/package.json +0 -3
  172. package/node_modules/@jimp/js-bmp/eslint.config.mjs +0 -2
  173. package/node_modules/@jimp/js-bmp/package.json +0 -69
  174. package/node_modules/@jimp/js-bmp/src/images/windows95.bmp +0 -0
  175. package/node_modules/@jimp/js-bmp/src/images/windows95.png +0 -0
  176. package/node_modules/@jimp/js-bmp/src/index.node.test.ts +0 -17
  177. package/node_modules/@jimp/js-bmp/src/index.test.ts +0 -32
  178. package/node_modules/@jimp/js-bmp/src/index.ts +0 -99
  179. package/node_modules/@jimp/js-bmp/tsconfig.json +0 -6
  180. package/node_modules/@jimp/js-bmp/vitest.config.browser.mjs +0 -3
  181. package/node_modules/@jimp/js-gif/.tshy/build.json +0 -8
  182. package/node_modules/@jimp/js-gif/.tshy/commonjs.json +0 -17
  183. package/node_modules/@jimp/js-gif/.tshy/esm.json +0 -16
  184. package/node_modules/@jimp/js-gif/.turbo/turbo-build.log +0 -5
  185. package/node_modules/@jimp/js-gif/CHANGELOG.md +0 -39
  186. package/node_modules/@jimp/js-gif/LICENSE +0 -21
  187. package/node_modules/@jimp/js-gif/README.md +0 -8
  188. package/node_modules/@jimp/js-gif/dist/commonjs/index.d.ts +0 -13
  189. package/node_modules/@jimp/js-gif/dist/commonjs/index.d.ts.map +0 -1
  190. package/node_modules/@jimp/js-gif/dist/commonjs/index.js +0 -32
  191. package/node_modules/@jimp/js-gif/dist/commonjs/index.js.map +0 -1
  192. package/node_modules/@jimp/js-gif/dist/commonjs/package.json +0 -3
  193. package/node_modules/@jimp/js-gif/dist/esm/index.d.ts +0 -13
  194. package/node_modules/@jimp/js-gif/dist/esm/index.d.ts.map +0 -1
  195. package/node_modules/@jimp/js-gif/dist/esm/index.js +0 -26
  196. package/node_modules/@jimp/js-gif/dist/esm/index.js.map +0 -1
  197. package/node_modules/@jimp/js-gif/dist/esm/package.json +0 -3
  198. package/node_modules/@jimp/js-gif/eslint.config.mjs +0 -2
  199. package/node_modules/@jimp/js-gif/package.json +0 -69
  200. package/node_modules/@jimp/js-gif/src/index.test.ts +0 -25
  201. package/node_modules/@jimp/js-gif/src/index.ts +0 -33
  202. package/node_modules/@jimp/js-gif/tsconfig.json +0 -6
  203. package/node_modules/@jimp/js-gif/vitest.config.browser.mjs +0 -3
  204. package/node_modules/@jimp/js-jpeg/.tshy/build.json +0 -8
  205. package/node_modules/@jimp/js-jpeg/.tshy/commonjs.json +0 -17
  206. package/node_modules/@jimp/js-jpeg/.tshy/esm.json +0 -16
  207. package/node_modules/@jimp/js-jpeg/.turbo/turbo-build.log +0 -5
  208. package/node_modules/@jimp/js-jpeg/CHANGELOG.md +0 -74
  209. package/node_modules/@jimp/js-jpeg/LICENSE +0 -21
  210. package/node_modules/@jimp/js-jpeg/README.md +0 -6
  211. package/node_modules/@jimp/js-jpeg/dist/commonjs/index.d.ts +0 -20
  212. package/node_modules/@jimp/js-jpeg/dist/commonjs/index.d.ts.map +0 -1
  213. package/node_modules/@jimp/js-jpeg/dist/commonjs/index.js +0 -15
  214. package/node_modules/@jimp/js-jpeg/dist/commonjs/index.js.map +0 -1
  215. package/node_modules/@jimp/js-jpeg/dist/commonjs/package.json +0 -3
  216. package/node_modules/@jimp/js-jpeg/dist/esm/index.d.ts +0 -20
  217. package/node_modules/@jimp/js-jpeg/dist/esm/index.d.ts.map +0 -1
  218. package/node_modules/@jimp/js-jpeg/dist/esm/index.js +0 -9
  219. package/node_modules/@jimp/js-jpeg/dist/esm/index.js.map +0 -1
  220. package/node_modules/@jimp/js-jpeg/dist/esm/package.json +0 -3
  221. package/node_modules/@jimp/js-jpeg/eslint.config.mjs +0 -2
  222. package/node_modules/@jimp/js-jpeg/package.json +0 -66
  223. package/node_modules/@jimp/js-jpeg/src/index.test.ts +0 -43
  224. package/node_modules/@jimp/js-jpeg/src/index.ts +0 -24
  225. package/node_modules/@jimp/js-jpeg/tsconfig.json +0 -6
  226. package/node_modules/@jimp/js-jpeg/vitest.config.browser.mjs +0 -3
  227. package/node_modules/@jimp/js-png/.tshy/build.json +0 -8
  228. package/node_modules/@jimp/js-png/.tshy/commonjs.json +0 -17
  229. package/node_modules/@jimp/js-png/.tshy/esm.json +0 -16
  230. package/node_modules/@jimp/js-png/.turbo/turbo-build.log +0 -5
  231. package/node_modules/@jimp/js-png/CHANGELOG.md +0 -73
  232. package/node_modules/@jimp/js-png/LICENSE +0 -21
  233. package/node_modules/@jimp/js-png/README.md +0 -35
  234. package/node_modules/@jimp/js-png/dist/commonjs/constants.d.ts +0 -29
  235. package/node_modules/@jimp/js-png/dist/commonjs/constants.d.ts.map +0 -1
  236. package/node_modules/@jimp/js-png/dist/commonjs/constants.js +0 -34
  237. package/node_modules/@jimp/js-png/dist/commonjs/constants.js.map +0 -1
  238. package/node_modules/@jimp/js-png/dist/commonjs/index.d.ts +0 -24
  239. package/node_modules/@jimp/js-png/dist/commonjs/index.d.ts.map +0 -1
  240. package/node_modules/@jimp/js-png/dist/commonjs/index.js +0 -54
  241. package/node_modules/@jimp/js-png/dist/commonjs/index.js.map +0 -1
  242. package/node_modules/@jimp/js-png/dist/commonjs/package.json +0 -3
  243. package/node_modules/@jimp/js-png/dist/esm/constants.d.ts +0 -29
  244. package/node_modules/@jimp/js-png/dist/esm/constants.d.ts.map +0 -1
  245. package/node_modules/@jimp/js-png/dist/esm/constants.js +0 -31
  246. package/node_modules/@jimp/js-png/dist/esm/constants.js.map +0 -1
  247. package/node_modules/@jimp/js-png/dist/esm/index.d.ts +0 -24
  248. package/node_modules/@jimp/js-png/dist/esm/index.d.ts.map +0 -1
  249. package/node_modules/@jimp/js-png/dist/esm/index.js +0 -37
  250. package/node_modules/@jimp/js-png/dist/esm/index.js.map +0 -1
  251. package/node_modules/@jimp/js-png/dist/esm/package.json +0 -3
  252. package/node_modules/@jimp/js-png/eslint.config.mjs +0 -2
  253. package/node_modules/@jimp/js-png/package.json +0 -67
  254. package/node_modules/@jimp/js-png/src/__image_snapshots__/index-node-test-ts-png-should-use-png-options-1-snap.png +0 -0
  255. package/node_modules/@jimp/js-png/src/constants.ts +0 -29
  256. package/node_modules/@jimp/js-png/src/index.node.test.ts +0 -29
  257. package/node_modules/@jimp/js-png/src/index.test.ts +0 -29
  258. package/node_modules/@jimp/js-png/src/index.ts +0 -68
  259. package/node_modules/@jimp/js-png/src/output.png +0 -0
  260. package/node_modules/@jimp/js-png/tsconfig.json +0 -6
  261. package/node_modules/@jimp/js-png/vitest.config.browser.mjs +0 -3
  262. package/node_modules/@jimp/js-tiff/.tshy/build.json +0 -8
  263. package/node_modules/@jimp/js-tiff/.tshy/commonjs.json +0 -17
  264. package/node_modules/@jimp/js-tiff/.tshy/esm.json +0 -16
  265. package/node_modules/@jimp/js-tiff/.turbo/turbo-build.log +0 -5
  266. package/node_modules/@jimp/js-tiff/CHANGELOG.md +0 -51
  267. package/node_modules/@jimp/js-tiff/LICENSE +0 -21
  268. package/node_modules/@jimp/js-tiff/README.md +0 -6
  269. package/node_modules/@jimp/js-tiff/dist/commonjs/index.d.ts +0 -7
  270. package/node_modules/@jimp/js-tiff/dist/commonjs/index.d.ts.map +0 -1
  271. package/node_modules/@jimp/js-tiff/dist/commonjs/index.js +0 -51
  272. package/node_modules/@jimp/js-tiff/dist/commonjs/index.js.map +0 -1
  273. package/node_modules/@jimp/js-tiff/dist/commonjs/package.json +0 -3
  274. package/node_modules/@jimp/js-tiff/dist/esm/index.d.ts +0 -7
  275. package/node_modules/@jimp/js-tiff/dist/esm/index.d.ts.map +0 -1
  276. package/node_modules/@jimp/js-tiff/dist/esm/index.js +0 -45
  277. package/node_modules/@jimp/js-tiff/dist/esm/index.js.map +0 -1
  278. package/node_modules/@jimp/js-tiff/dist/esm/package.json +0 -3
  279. package/node_modules/@jimp/js-tiff/eslint.config.mjs +0 -2
  280. package/node_modules/@jimp/js-tiff/package.json +0 -67
  281. package/node_modules/@jimp/js-tiff/src/index.test.ts +0 -32
  282. package/node_modules/@jimp/js-tiff/src/index.ts +0 -56
  283. package/node_modules/@jimp/js-tiff/tsconfig.json +0 -6
  284. package/node_modules/@jimp/js-tiff/vitest.config.browser.mjs +0 -3
  285. package/node_modules/@jimp/plugin-blit/.tshy/build.json +0 -8
  286. package/node_modules/@jimp/plugin-blit/.tshy/commonjs.json +0 -17
  287. package/node_modules/@jimp/plugin-blit/.tshy/esm.json +0 -16
  288. package/node_modules/@jimp/plugin-blit/.turbo/turbo-build.log +0 -5
  289. package/node_modules/@jimp/plugin-blit/CHANGELOG.md +0 -64
  290. package/node_modules/@jimp/plugin-blit/LICENSE +0 -21
  291. package/node_modules/@jimp/plugin-blit/README.md +0 -10
  292. package/node_modules/@jimp/plugin-blit/dist/commonjs/index.d.ts +0 -118
  293. package/node_modules/@jimp/plugin-blit/dist/commonjs/index.d.ts.map +0 -1
  294. package/node_modules/@jimp/plugin-blit/dist/commonjs/index.js +0 -92
  295. package/node_modules/@jimp/plugin-blit/dist/commonjs/index.js.map +0 -1
  296. package/node_modules/@jimp/plugin-blit/dist/commonjs/package.json +0 -3
  297. package/node_modules/@jimp/plugin-blit/dist/esm/index.d.ts +0 -118
  298. package/node_modules/@jimp/plugin-blit/dist/esm/index.d.ts.map +0 -1
  299. package/node_modules/@jimp/plugin-blit/dist/esm/index.js +0 -89
  300. package/node_modules/@jimp/plugin-blit/dist/esm/index.js.map +0 -1
  301. package/node_modules/@jimp/plugin-blit/dist/esm/package.json +0 -3
  302. package/node_modules/@jimp/plugin-blit/eslint.config.mjs +0 -2
  303. package/node_modules/@jimp/plugin-blit/package.json +0 -69
  304. package/node_modules/@jimp/plugin-blit/src/__image_snapshots__/index-node-test-ts-blit-over-image-blit-alpha-1-snap.png +0 -0
  305. package/node_modules/@jimp/plugin-blit/src/__image_snapshots__/index-node-test-ts-blit-over-image-uses-src-params-correctly-1-snap.png +0 -0
  306. package/node_modules/@jimp/plugin-blit/src/__image_snapshots__/index-node-test-ts-blit-over-image-uses-src-params-correctly-2-snap.png +0 -0
  307. package/node_modules/@jimp/plugin-blit/src/__image_snapshots__/index-node-test-ts-blit-over-image-uses-src-params-correctly-3-snap.png +0 -0
  308. package/node_modules/@jimp/plugin-blit/src/__snapshots__/index.test.ts.snap +0 -145
  309. package/node_modules/@jimp/plugin-blit/src/images/blit-alpha.png +0 -0
  310. package/node_modules/@jimp/plugin-blit/src/images/cat-results/large-cat.png +0 -0
  311. package/node_modules/@jimp/plugin-blit/src/images/cat-results/medium-cat.png +0 -0
  312. package/node_modules/@jimp/plugin-blit/src/images/cat-results/small-cat.png +0 -0
  313. package/node_modules/@jimp/plugin-blit/src/images/cat_butt.png +0 -0
  314. package/node_modules/@jimp/plugin-blit/src/images/cat_fuzz.png +0 -0
  315. package/node_modules/@jimp/plugin-blit/src/images/cat_head.png +0 -0
  316. package/node_modules/@jimp/plugin-blit/src/index.node.test.ts +0 -86
  317. package/node_modules/@jimp/plugin-blit/src/index.test.ts +0 -72
  318. package/node_modules/@jimp/plugin-blit/src/index.ts +0 -114
  319. package/node_modules/@jimp/plugin-blit/tsconfig.json +0 -6
  320. package/node_modules/@jimp/plugin-blit/vitest.config.browser.mjs +0 -3
  321. package/node_modules/@jimp/plugin-blur/.tshy/build.json +0 -8
  322. package/node_modules/@jimp/plugin-blur/.tshy/commonjs.json +0 -17
  323. package/node_modules/@jimp/plugin-blur/.tshy/esm.json +0 -16
  324. package/node_modules/@jimp/plugin-blur/.turbo/turbo-build.log +0 -5
  325. package/node_modules/@jimp/plugin-blur/CHANGELOG.md +0 -64
  326. package/node_modules/@jimp/plugin-blur/LICENSE +0 -21
  327. package/node_modules/@jimp/plugin-blur/README.md +0 -11
  328. package/node_modules/@jimp/plugin-blur/dist/commonjs/blur-tables.d.ts +0 -3
  329. package/node_modules/@jimp/plugin-blur/dist/commonjs/blur-tables.d.ts.map +0 -1
  330. package/node_modules/@jimp/plugin-blur/dist/commonjs/blur-tables.js +0 -38
  331. package/node_modules/@jimp/plugin-blur/dist/commonjs/blur-tables.js.map +0 -1
  332. package/node_modules/@jimp/plugin-blur/dist/commonjs/index.d.ts +0 -30
  333. package/node_modules/@jimp/plugin-blur/dist/commonjs/index.d.ts.map +0 -1
  334. package/node_modules/@jimp/plugin-blur/dist/commonjs/index.js +0 -211
  335. package/node_modules/@jimp/plugin-blur/dist/commonjs/index.js.map +0 -1
  336. package/node_modules/@jimp/plugin-blur/dist/commonjs/package.json +0 -3
  337. package/node_modules/@jimp/plugin-blur/dist/esm/blur-tables.d.ts +0 -3
  338. package/node_modules/@jimp/plugin-blur/dist/esm/blur-tables.d.ts.map +0 -1
  339. package/node_modules/@jimp/plugin-blur/dist/esm/blur-tables.js +0 -35
  340. package/node_modules/@jimp/plugin-blur/dist/esm/blur-tables.js.map +0 -1
  341. package/node_modules/@jimp/plugin-blur/dist/esm/index.d.ts +0 -30
  342. package/node_modules/@jimp/plugin-blur/dist/esm/index.d.ts.map +0 -1
  343. package/node_modules/@jimp/plugin-blur/dist/esm/index.js +0 -208
  344. package/node_modules/@jimp/plugin-blur/dist/esm/index.js.map +0 -1
  345. package/node_modules/@jimp/plugin-blur/dist/esm/package.json +0 -3
  346. package/node_modules/@jimp/plugin-blur/eslint.config.mjs +0 -2
  347. package/node_modules/@jimp/plugin-blur/package.json +0 -66
  348. package/node_modules/@jimp/plugin-blur/src/__image_snapshots__/index-node-test-ts-has-alpha-image-with-alpha-1-snap.png +0 -0
  349. package/node_modules/@jimp/plugin-blur/src/blur-tables.ts +0 -35
  350. package/node_modules/@jimp/plugin-blur/src/index.node.test.ts +0 -17
  351. package/node_modules/@jimp/plugin-blur/src/index.ts +0 -251
  352. package/node_modules/@jimp/plugin-blur/tsconfig.json +0 -6
  353. package/node_modules/@jimp/plugin-blur/vitest.config.browser.mjs +0 -3
  354. package/node_modules/@jimp/plugin-circle/.tshy/build.json +0 -8
  355. package/node_modules/@jimp/plugin-circle/.tshy/commonjs.json +0 -17
  356. package/node_modules/@jimp/plugin-circle/.tshy/esm.json +0 -16
  357. package/node_modules/@jimp/plugin-circle/.turbo/turbo-build.log +0 -5
  358. package/node_modules/@jimp/plugin-circle/CHANGELOG.md +0 -52
  359. package/node_modules/@jimp/plugin-circle/LICENSE +0 -21
  360. package/node_modules/@jimp/plugin-circle/README.md +0 -8
  361. package/node_modules/@jimp/plugin-circle/dist/commonjs/index.d.ts +0 -37
  362. package/node_modules/@jimp/plugin-circle/dist/commonjs/index.d.ts.map +0 -1
  363. package/node_modules/@jimp/plugin-circle/dist/commonjs/index.js +0 -49
  364. package/node_modules/@jimp/plugin-circle/dist/commonjs/index.js.map +0 -1
  365. package/node_modules/@jimp/plugin-circle/dist/commonjs/package.json +0 -3
  366. package/node_modules/@jimp/plugin-circle/dist/esm/index.d.ts +0 -37
  367. package/node_modules/@jimp/plugin-circle/dist/esm/index.d.ts.map +0 -1
  368. package/node_modules/@jimp/plugin-circle/dist/esm/index.js +0 -46
  369. package/node_modules/@jimp/plugin-circle/dist/esm/index.js.map +0 -1
  370. package/node_modules/@jimp/plugin-circle/dist/esm/package.json +0 -3
  371. package/node_modules/@jimp/plugin-circle/eslint.config.mjs +0 -2
  372. package/node_modules/@jimp/plugin-circle/package.json +0 -66
  373. package/node_modules/@jimp/plugin-circle/src/__snapshots__/index.test.ts.snap +0 -85
  374. package/node_modules/@jimp/plugin-circle/src/index.test.ts +0 -67
  375. package/node_modules/@jimp/plugin-circle/src/index.ts +0 -56
  376. package/node_modules/@jimp/plugin-circle/tsconfig.json +0 -6
  377. package/node_modules/@jimp/plugin-circle/vitest.config.browser.mjs +0 -3
  378. package/node_modules/@jimp/plugin-color/.tshy/build.json +0 -8
  379. package/node_modules/@jimp/plugin-color/.tshy/commonjs.json +0 -17
  380. package/node_modules/@jimp/plugin-color/.tshy/esm.json +0 -16
  381. package/node_modules/@jimp/plugin-color/.turbo/turbo-build.log +0 -5
  382. package/node_modules/@jimp/plugin-color/CHANGELOG.md +0 -74
  383. package/node_modules/@jimp/plugin-color/LICENSE +0 -21
  384. package/node_modules/@jimp/plugin-color/README.md +0 -20
  385. package/node_modules/@jimp/plugin-color/dist/commonjs/index.d.ts +0 -706
  386. package/node_modules/@jimp/plugin-color/dist/commonjs/index.d.ts.map +0 -1
  387. package/node_modules/@jimp/plugin-color/dist/commonjs/index.js +0 -713
  388. package/node_modules/@jimp/plugin-color/dist/commonjs/index.js.map +0 -1
  389. package/node_modules/@jimp/plugin-color/dist/commonjs/package.json +0 -3
  390. package/node_modules/@jimp/plugin-color/dist/esm/index.d.ts +0 -706
  391. package/node_modules/@jimp/plugin-color/dist/esm/index.d.ts.map +0 -1
  392. package/node_modules/@jimp/plugin-color/dist/esm/index.js +0 -707
  393. package/node_modules/@jimp/plugin-color/dist/esm/index.js.map +0 -1
  394. package/node_modules/@jimp/plugin-color/dist/esm/package.json +0 -3
  395. package/node_modules/@jimp/plugin-color/eslint.config.mjs +0 -2
  396. package/node_modules/@jimp/plugin-color/package.json +0 -72
  397. package/node_modules/@jimp/plugin-color/src/__image_snapshots__/birghtness-node-test-ts-brightness-3-x-3-box-blur-matrix-using-convolute-1-snap.png +0 -0
  398. package/node_modules/@jimp/plugin-color/src/__image_snapshots__/convolution-node-test-ts-convolution-3-x-3-box-blur-matrix-using-convolute-1-snap.png +0 -0
  399. package/node_modules/@jimp/plugin-color/src/__image_snapshots__/convolution-node-test-ts-convolution-new-pixel-value-is-greater-than-255-1-snap.png +0 -0
  400. package/node_modules/@jimp/plugin-color/src/__snapshots__/convolution.test.ts.snap +0 -145
  401. package/node_modules/@jimp/plugin-color/src/__snapshots__/index.test.ts.snap +0 -169
  402. package/node_modules/@jimp/plugin-color/src/__snapshots__/normalize.test.ts.snap +0 -27
  403. package/node_modules/@jimp/plugin-color/src/birghtness.node.test.ts +0 -18
  404. package/node_modules/@jimp/plugin-color/src/convolution.node.test.ts +0 -42
  405. package/node_modules/@jimp/plugin-color/src/convolution.test.ts +0 -71
  406. package/node_modules/@jimp/plugin-color/src/images/qr.jpg +0 -0
  407. package/node_modules/@jimp/plugin-color/src/images/tiles.jpg +0 -0
  408. package/node_modules/@jimp/plugin-color/src/index.test.ts +0 -63
  409. package/node_modules/@jimp/plugin-color/src/index.ts +0 -863
  410. package/node_modules/@jimp/plugin-color/src/normalize.test.ts +0 -27
  411. package/node_modules/@jimp/plugin-color/tsconfig.json +0 -6
  412. package/node_modules/@jimp/plugin-color/vitest.config.browser.mjs +0 -3
  413. package/node_modules/@jimp/plugin-contain/.tshy/build.json +0 -8
  414. package/node_modules/@jimp/plugin-contain/.tshy/commonjs.json +0 -17
  415. package/node_modules/@jimp/plugin-contain/.tshy/esm.json +0 -16
  416. package/node_modules/@jimp/plugin-contain/.turbo/turbo-build.log +0 -5
  417. package/node_modules/@jimp/plugin-contain/CHANGELOG.md +0 -52
  418. package/node_modules/@jimp/plugin-contain/LICENSE +0 -21
  419. package/node_modules/@jimp/plugin-contain/README.md +0 -8
  420. package/node_modules/@jimp/plugin-contain/dist/commonjs/index.d.ts +0 -44
  421. package/node_modules/@jimp/plugin-contain/dist/commonjs/index.d.ts.map +0 -1
  422. package/node_modules/@jimp/plugin-contain/dist/commonjs/index.js +0 -62
  423. package/node_modules/@jimp/plugin-contain/dist/commonjs/index.js.map +0 -1
  424. package/node_modules/@jimp/plugin-contain/dist/commonjs/package.json +0 -3
  425. package/node_modules/@jimp/plugin-contain/dist/esm/index.d.ts +0 -44
  426. package/node_modules/@jimp/plugin-contain/dist/esm/index.d.ts.map +0 -1
  427. package/node_modules/@jimp/plugin-contain/dist/esm/index.js +0 -59
  428. package/node_modules/@jimp/plugin-contain/dist/esm/index.js.map +0 -1
  429. package/node_modules/@jimp/plugin-contain/dist/esm/package.json +0 -3
  430. package/node_modules/@jimp/plugin-contain/eslint.config.mjs +0 -2
  431. package/node_modules/@jimp/plugin-contain/package.json +0 -69
  432. package/node_modules/@jimp/plugin-contain/src/__snapshots__/index.test.ts.snap +0 -361
  433. package/node_modules/@jimp/plugin-contain/src/index.test.ts +0 -75
  434. package/node_modules/@jimp/plugin-contain/src/index.ts +0 -82
  435. package/node_modules/@jimp/plugin-contain/tsconfig.json +0 -6
  436. package/node_modules/@jimp/plugin-contain/vitest.config.browser.mjs +0 -3
  437. package/node_modules/@jimp/plugin-cover/.tshy/build.json +0 -8
  438. package/node_modules/@jimp/plugin-cover/.tshy/commonjs.json +0 -17
  439. package/node_modules/@jimp/plugin-cover/.tshy/esm.json +0 -16
  440. package/node_modules/@jimp/plugin-cover/.turbo/turbo-build.log +0 -5
  441. package/node_modules/@jimp/plugin-cover/CHANGELOG.md +0 -62
  442. package/node_modules/@jimp/plugin-cover/LICENSE +0 -21
  443. package/node_modules/@jimp/plugin-cover/README.md +0 -8
  444. package/node_modules/@jimp/plugin-cover/dist/commonjs/index.d.ts +0 -40
  445. package/node_modules/@jimp/plugin-cover/dist/commonjs/index.d.ts.map +0 -1
  446. package/node_modules/@jimp/plugin-cover/dist/commonjs/index.js +0 -57
  447. package/node_modules/@jimp/plugin-cover/dist/commonjs/index.js.map +0 -1
  448. package/node_modules/@jimp/plugin-cover/dist/commonjs/package.json +0 -3
  449. package/node_modules/@jimp/plugin-cover/dist/esm/index.d.ts +0 -40
  450. package/node_modules/@jimp/plugin-cover/dist/esm/index.d.ts.map +0 -1
  451. package/node_modules/@jimp/plugin-cover/dist/esm/index.js +0 -54
  452. package/node_modules/@jimp/plugin-cover/dist/esm/index.js.map +0 -1
  453. package/node_modules/@jimp/plugin-cover/dist/esm/package.json +0 -3
  454. package/node_modules/@jimp/plugin-cover/eslint.config.mjs +0 -2
  455. package/node_modules/@jimp/plugin-cover/package.json +0 -68
  456. package/node_modules/@jimp/plugin-cover/src/__snapshots__/index.test.ts.snap +0 -289
  457. package/node_modules/@jimp/plugin-cover/src/index.test.ts +0 -74
  458. package/node_modules/@jimp/plugin-cover/src/index.ts +0 -73
  459. package/node_modules/@jimp/plugin-cover/tsconfig.json +0 -6
  460. package/node_modules/@jimp/plugin-cover/vitest.config.browser.mjs +0 -3
  461. package/node_modules/@jimp/plugin-crop/.tshy/build.json +0 -8
  462. package/node_modules/@jimp/plugin-crop/.tshy/commonjs.json +0 -17
  463. package/node_modules/@jimp/plugin-crop/.tshy/esm.json +0 -16
  464. package/node_modules/@jimp/plugin-crop/.turbo/turbo-build.log +0 -5
  465. package/node_modules/@jimp/plugin-crop/CHANGELOG.md +0 -52
  466. package/node_modules/@jimp/plugin-crop/LICENSE +0 -21
  467. package/node_modules/@jimp/plugin-crop/README.md +0 -9
  468. package/node_modules/@jimp/plugin-crop/dist/commonjs/index.d.ts +0 -102
  469. package/node_modules/@jimp/plugin-crop/dist/commonjs/index.d.ts.map +0 -1
  470. package/node_modules/@jimp/plugin-crop/dist/commonjs/index.js +0 -229
  471. package/node_modules/@jimp/plugin-crop/dist/commonjs/index.js.map +0 -1
  472. package/node_modules/@jimp/plugin-crop/dist/commonjs/package.json +0 -3
  473. package/node_modules/@jimp/plugin-crop/dist/esm/index.d.ts +0 -102
  474. package/node_modules/@jimp/plugin-crop/dist/esm/index.d.ts.map +0 -1
  475. package/node_modules/@jimp/plugin-crop/dist/esm/index.js +0 -226
  476. package/node_modules/@jimp/plugin-crop/dist/esm/index.js.map +0 -1
  477. package/node_modules/@jimp/plugin-crop/dist/esm/package.json +0 -3
  478. package/node_modules/@jimp/plugin-crop/eslint.config.mjs +0 -2
  479. package/node_modules/@jimp/plugin-crop/package.json +0 -68
  480. package/node_modules/@jimp/plugin-crop/src/__snapshots__/autocrop.test.ts.snap +0 -353
  481. package/node_modules/@jimp/plugin-crop/src/__snapshots__/crop.test.ts.snap +0 -91
  482. package/node_modules/@jimp/plugin-crop/src/autocrop.test.ts +0 -287
  483. package/node_modules/@jimp/plugin-crop/src/crop.test.ts +0 -54
  484. package/node_modules/@jimp/plugin-crop/src/index.ts +0 -280
  485. package/node_modules/@jimp/plugin-crop/tsconfig.json +0 -6
  486. package/node_modules/@jimp/plugin-crop/vitest.config.browser.mjs +0 -3
  487. package/node_modules/@jimp/plugin-displace/.tshy/build.json +0 -8
  488. package/node_modules/@jimp/plugin-displace/.tshy/commonjs.json +0 -17
  489. package/node_modules/@jimp/plugin-displace/.tshy/esm.json +0 -16
  490. package/node_modules/@jimp/plugin-displace/.turbo/turbo-build.log +0 -5
  491. package/node_modules/@jimp/plugin-displace/CHANGELOG.md +0 -52
  492. package/node_modules/@jimp/plugin-displace/LICENSE +0 -21
  493. package/node_modules/@jimp/plugin-displace/README.md +0 -10
  494. package/node_modules/@jimp/plugin-displace/dist/commonjs/index.d.ts +0 -72
  495. package/node_modules/@jimp/plugin-displace/dist/commonjs/index.d.ts.map +0 -1
  496. package/node_modules/@jimp/plugin-displace/dist/commonjs/index.js +0 -42
  497. package/node_modules/@jimp/plugin-displace/dist/commonjs/index.js.map +0 -1
  498. package/node_modules/@jimp/plugin-displace/dist/commonjs/package.json +0 -3
  499. package/node_modules/@jimp/plugin-displace/dist/esm/index.d.ts +0 -72
  500. package/node_modules/@jimp/plugin-displace/dist/esm/index.d.ts.map +0 -1
  501. package/node_modules/@jimp/plugin-displace/dist/esm/index.js +0 -39
  502. package/node_modules/@jimp/plugin-displace/dist/esm/index.js.map +0 -1
  503. package/node_modules/@jimp/plugin-displace/dist/esm/package.json +0 -3
  504. package/node_modules/@jimp/plugin-displace/eslint.config.mjs +0 -2
  505. package/node_modules/@jimp/plugin-displace/package.json +0 -60
  506. package/node_modules/@jimp/plugin-displace/src/index.ts +0 -45
  507. package/node_modules/@jimp/plugin-displace/tsconfig.json +0 -6
  508. package/node_modules/@jimp/plugin-dither/.tshy/build.json +0 -8
  509. package/node_modules/@jimp/plugin-dither/.tshy/commonjs.json +0 -17
  510. package/node_modules/@jimp/plugin-dither/.tshy/esm.json +0 -16
  511. package/node_modules/@jimp/plugin-dither/.turbo/turbo-build.log +0 -5
  512. package/node_modules/@jimp/plugin-dither/CHANGELOG.md +0 -58
  513. package/node_modules/@jimp/plugin-dither/LICENSE +0 -21
  514. package/node_modules/@jimp/plugin-dither/README.md +0 -10
  515. package/node_modules/@jimp/plugin-dither/dist/commonjs/index.d.ts +0 -16
  516. package/node_modules/@jimp/plugin-dither/dist/commonjs/index.d.ts.map +0 -1
  517. package/node_modules/@jimp/plugin-dither/dist/commonjs/index.js +0 -30
  518. package/node_modules/@jimp/plugin-dither/dist/commonjs/index.js.map +0 -1
  519. package/node_modules/@jimp/plugin-dither/dist/commonjs/package.json +0 -3
  520. package/node_modules/@jimp/plugin-dither/dist/esm/index.d.ts +0 -16
  521. package/node_modules/@jimp/plugin-dither/dist/esm/index.d.ts.map +0 -1
  522. package/node_modules/@jimp/plugin-dither/dist/esm/index.js +0 -27
  523. package/node_modules/@jimp/plugin-dither/dist/esm/index.js.map +0 -1
  524. package/node_modules/@jimp/plugin-dither/dist/esm/package.json +0 -3
  525. package/node_modules/@jimp/plugin-dither/eslint.config.mjs +0 -2
  526. package/node_modules/@jimp/plugin-dither/package.json +0 -58
  527. package/node_modules/@jimp/plugin-dither/src/index.ts +0 -37
  528. package/node_modules/@jimp/plugin-dither/tsconfig.json +0 -6
  529. package/node_modules/@jimp/plugin-fisheye/.tshy/build.json +0 -8
  530. package/node_modules/@jimp/plugin-fisheye/.tshy/commonjs.json +0 -17
  531. package/node_modules/@jimp/plugin-fisheye/.tshy/esm.json +0 -16
  532. package/node_modules/@jimp/plugin-fisheye/.turbo/turbo-build.log +0 -5
  533. package/node_modules/@jimp/plugin-fisheye/CHANGELOG.md +0 -52
  534. package/node_modules/@jimp/plugin-fisheye/LICENSE +0 -21
  535. package/node_modules/@jimp/plugin-fisheye/README.md +0 -8
  536. package/node_modules/@jimp/plugin-fisheye/dist/commonjs/index.d.ts +0 -27
  537. package/node_modules/@jimp/plugin-fisheye/dist/commonjs/index.d.ts.map +0 -1
  538. package/node_modules/@jimp/plugin-fisheye/dist/commonjs/index.js +0 -43
  539. package/node_modules/@jimp/plugin-fisheye/dist/commonjs/index.js.map +0 -1
  540. package/node_modules/@jimp/plugin-fisheye/dist/commonjs/package.json +0 -3
  541. package/node_modules/@jimp/plugin-fisheye/dist/esm/index.d.ts +0 -27
  542. package/node_modules/@jimp/plugin-fisheye/dist/esm/index.d.ts.map +0 -1
  543. package/node_modules/@jimp/plugin-fisheye/dist/esm/index.js +0 -40
  544. package/node_modules/@jimp/plugin-fisheye/dist/esm/index.js.map +0 -1
  545. package/node_modules/@jimp/plugin-fisheye/dist/esm/package.json +0 -3
  546. package/node_modules/@jimp/plugin-fisheye/eslint.config.mjs +0 -2
  547. package/node_modules/@jimp/plugin-fisheye/package.json +0 -67
  548. package/node_modules/@jimp/plugin-fisheye/src/__snapshots__/index.test.ts.snap +0 -57
  549. package/node_modules/@jimp/plugin-fisheye/src/index.test.ts +0 -48
  550. package/node_modules/@jimp/plugin-fisheye/src/index.ts +0 -52
  551. package/node_modules/@jimp/plugin-fisheye/tsconfig.json +0 -6
  552. package/node_modules/@jimp/plugin-fisheye/vitest.config.browser.mjs +0 -3
  553. package/node_modules/@jimp/plugin-flip/.tshy/build.json +0 -8
  554. package/node_modules/@jimp/plugin-flip/.tshy/commonjs.json +0 -17
  555. package/node_modules/@jimp/plugin-flip/.tshy/esm.json +0 -16
  556. package/node_modules/@jimp/plugin-flip/.turbo/turbo-build.log +0 -5
  557. package/node_modules/@jimp/plugin-flip/CHANGELOG.md +0 -52
  558. package/node_modules/@jimp/plugin-flip/LICENSE +0 -21
  559. package/node_modules/@jimp/plugin-flip/README.md +0 -13
  560. package/node_modules/@jimp/plugin-flip/dist/commonjs/index.d.ts +0 -33
  561. package/node_modules/@jimp/plugin-flip/dist/commonjs/index.d.ts.map +0 -1
  562. package/node_modules/@jimp/plugin-flip/dist/commonjs/index.js +0 -39
  563. package/node_modules/@jimp/plugin-flip/dist/commonjs/index.js.map +0 -1
  564. package/node_modules/@jimp/plugin-flip/dist/commonjs/package.json +0 -3
  565. package/node_modules/@jimp/plugin-flip/dist/esm/index.d.ts +0 -33
  566. package/node_modules/@jimp/plugin-flip/dist/esm/index.d.ts.map +0 -1
  567. package/node_modules/@jimp/plugin-flip/dist/esm/index.js +0 -36
  568. package/node_modules/@jimp/plugin-flip/dist/esm/index.js.map +0 -1
  569. package/node_modules/@jimp/plugin-flip/dist/esm/package.json +0 -3
  570. package/node_modules/@jimp/plugin-flip/eslint.config.mjs +0 -2
  571. package/node_modules/@jimp/plugin-flip/package.json +0 -67
  572. package/node_modules/@jimp/plugin-flip/src/__snapshots__/index.test.ts.snap +0 -67
  573. package/node_modules/@jimp/plugin-flip/src/index.test.ts +0 -57
  574. package/node_modules/@jimp/plugin-flip/src/index.ts +0 -44
  575. package/node_modules/@jimp/plugin-flip/tsconfig.json +0 -6
  576. package/node_modules/@jimp/plugin-flip/vitest.config.browser.mjs +0 -3
  577. package/node_modules/@jimp/plugin-hash/.tshy/build.json +0 -8
  578. package/node_modules/@jimp/plugin-hash/.tshy/commonjs.json +0 -17
  579. package/node_modules/@jimp/plugin-hash/.tshy/esm.json +0 -16
  580. package/node_modules/@jimp/plugin-hash/.turbo/turbo-build.log +0 -5
  581. package/node_modules/@jimp/plugin-hash/CHANGELOG.md +0 -52
  582. package/node_modules/@jimp/plugin-hash/LICENSE +0 -21
  583. package/node_modules/@jimp/plugin-hash/dist/commonjs/index.d.ts +0 -77
  584. package/node_modules/@jimp/plugin-hash/dist/commonjs/index.d.ts.map +0 -1
  585. package/node_modules/@jimp/plugin-hash/dist/commonjs/index.js +0 -120
  586. package/node_modules/@jimp/plugin-hash/dist/commonjs/index.js.map +0 -1
  587. package/node_modules/@jimp/plugin-hash/dist/commonjs/package.json +0 -3
  588. package/node_modules/@jimp/plugin-hash/dist/commonjs/phash.d.ts +0 -13
  589. package/node_modules/@jimp/plugin-hash/dist/commonjs/phash.d.ts.map +0 -1
  590. package/node_modules/@jimp/plugin-hash/dist/commonjs/phash.js +0 -161
  591. package/node_modules/@jimp/plugin-hash/dist/commonjs/phash.js.map +0 -1
  592. package/node_modules/@jimp/plugin-hash/dist/esm/index.d.ts +0 -77
  593. package/node_modules/@jimp/plugin-hash/dist/esm/index.d.ts.map +0 -1
  594. package/node_modules/@jimp/plugin-hash/dist/esm/index.js +0 -112
  595. package/node_modules/@jimp/plugin-hash/dist/esm/index.js.map +0 -1
  596. package/node_modules/@jimp/plugin-hash/dist/esm/package.json +0 -3
  597. package/node_modules/@jimp/plugin-hash/dist/esm/phash.d.ts +0 -13
  598. package/node_modules/@jimp/plugin-hash/dist/esm/phash.d.ts.map +0 -1
  599. package/node_modules/@jimp/plugin-hash/dist/esm/phash.js +0 -159
  600. package/node_modules/@jimp/plugin-hash/dist/esm/phash.js.map +0 -1
  601. package/node_modules/@jimp/plugin-hash/eslint.config.mjs +0 -2
  602. package/node_modules/@jimp/plugin-hash/package.json +0 -74
  603. package/node_modules/@jimp/plugin-hash/src/index.test.ts +0 -75
  604. package/node_modules/@jimp/plugin-hash/src/index.ts +0 -129
  605. package/node_modules/@jimp/plugin-hash/src/phash.ts +0 -189
  606. package/node_modules/@jimp/plugin-hash/tsconfig.json +0 -6
  607. package/node_modules/@jimp/plugin-hash/vitest.config.browser.mjs +0 -3
  608. package/node_modules/@jimp/plugin-mask/.tshy/build.json +0 -8
  609. package/node_modules/@jimp/plugin-mask/.tshy/commonjs.json +0 -17
  610. package/node_modules/@jimp/plugin-mask/.tshy/esm.json +0 -16
  611. package/node_modules/@jimp/plugin-mask/.turbo/turbo-build.log +0 -5
  612. package/node_modules/@jimp/plugin-mask/CHANGELOG.md +0 -52
  613. package/node_modules/@jimp/plugin-mask/LICENSE +0 -21
  614. package/node_modules/@jimp/plugin-mask/README.md +0 -10
  615. package/node_modules/@jimp/plugin-mask/dist/commonjs/index.d.ts +0 -102
  616. package/node_modules/@jimp/plugin-mask/dist/commonjs/index.d.ts.map +0 -1
  617. package/node_modules/@jimp/plugin-mask/dist/commonjs/index.js +0 -63
  618. package/node_modules/@jimp/plugin-mask/dist/commonjs/index.js.map +0 -1
  619. package/node_modules/@jimp/plugin-mask/dist/commonjs/package.json +0 -3
  620. package/node_modules/@jimp/plugin-mask/dist/esm/index.d.ts +0 -102
  621. package/node_modules/@jimp/plugin-mask/dist/esm/index.d.ts.map +0 -1
  622. package/node_modules/@jimp/plugin-mask/dist/esm/index.js +0 -60
  623. package/node_modules/@jimp/plugin-mask/dist/esm/index.js.map +0 -1
  624. package/node_modules/@jimp/plugin-mask/dist/esm/package.json +0 -3
  625. package/node_modules/@jimp/plugin-mask/eslint.config.mjs +0 -2
  626. package/node_modules/@jimp/plugin-mask/package.json +0 -66
  627. package/node_modules/@jimp/plugin-mask/src/__snapshots__/index.test.ts.snap +0 -125
  628. package/node_modules/@jimp/plugin-mask/src/index.test.ts +0 -95
  629. package/node_modules/@jimp/plugin-mask/src/index.ts +0 -71
  630. package/node_modules/@jimp/plugin-mask/tsconfig.json +0 -6
  631. package/node_modules/@jimp/plugin-mask/vitest.config.browser.mjs +0 -3
  632. package/node_modules/@jimp/plugin-print/.tshy/build.json +0 -8
  633. package/node_modules/@jimp/plugin-print/.tshy/commonjs.json +0 -17
  634. package/node_modules/@jimp/plugin-print/.tshy/esm.json +0 -17
  635. package/node_modules/@jimp/plugin-print/.turbo/turbo-build.log +0 -5
  636. package/node_modules/@jimp/plugin-print/CHANGELOG.md +0 -115
  637. package/node_modules/@jimp/plugin-print/LICENSE +0 -21
  638. package/node_modules/@jimp/plugin-print/README.md +0 -10
  639. package/node_modules/@jimp/plugin-print/dist/commonjs/dirname-cjs.cjs.map +0 -1
  640. package/node_modules/@jimp/plugin-print/dist/commonjs/dirname-cjs.d.cts.map +0 -1
  641. package/node_modules/@jimp/plugin-print/dist/commonjs/dirname.d.ts +0 -2
  642. package/node_modules/@jimp/plugin-print/dist/commonjs/dirname.js +0 -5
  643. package/node_modules/@jimp/plugin-print/dist/commonjs/fonts.d.ts +0 -14
  644. package/node_modules/@jimp/plugin-print/dist/commonjs/fonts.d.ts.map +0 -1
  645. package/node_modules/@jimp/plugin-print/dist/commonjs/fonts.js +0 -23
  646. package/node_modules/@jimp/plugin-print/dist/commonjs/fonts.js.map +0 -1
  647. package/node_modules/@jimp/plugin-print/dist/commonjs/index.d.ts +0 -93
  648. package/node_modules/@jimp/plugin-print/dist/commonjs/index.d.ts.map +0 -1
  649. package/node_modules/@jimp/plugin-print/dist/commonjs/index.js +0 -165
  650. package/node_modules/@jimp/plugin-print/dist/commonjs/index.js.map +0 -1
  651. package/node_modules/@jimp/plugin-print/dist/commonjs/load-bitmap-font.d.ts +0 -134
  652. package/node_modules/@jimp/plugin-print/dist/commonjs/load-bitmap-font.d.ts.map +0 -1
  653. package/node_modules/@jimp/plugin-print/dist/commonjs/load-bitmap-font.js +0 -126
  654. package/node_modules/@jimp/plugin-print/dist/commonjs/load-bitmap-font.js.map +0 -1
  655. package/node_modules/@jimp/plugin-print/dist/commonjs/load-font.d.ts +0 -131
  656. package/node_modules/@jimp/plugin-print/dist/commonjs/load-font.d.ts.map +0 -1
  657. package/node_modules/@jimp/plugin-print/dist/commonjs/load-font.js +0 -31
  658. package/node_modules/@jimp/plugin-print/dist/commonjs/load-font.js.map +0 -1
  659. package/node_modules/@jimp/plugin-print/dist/commonjs/measure-text.d.ts +0 -8
  660. package/node_modules/@jimp/plugin-print/dist/commonjs/measure-text.d.ts.map +0 -1
  661. package/node_modules/@jimp/plugin-print/dist/commonjs/measure-text.js +0 -75
  662. package/node_modules/@jimp/plugin-print/dist/commonjs/measure-text.js.map +0 -1
  663. package/node_modules/@jimp/plugin-print/dist/commonjs/package.json +0 -3
  664. package/node_modules/@jimp/plugin-print/dist/commonjs/types.d.ts +0 -29
  665. package/node_modules/@jimp/plugin-print/dist/commonjs/types.d.ts.map +0 -1
  666. package/node_modules/@jimp/plugin-print/dist/commonjs/types.js +0 -3
  667. package/node_modules/@jimp/plugin-print/dist/commonjs/types.js.map +0 -1
  668. package/node_modules/@jimp/plugin-print/dist/esm/dirname.d.ts +0 -2
  669. package/node_modules/@jimp/plugin-print/dist/esm/dirname.d.ts.map +0 -1
  670. package/node_modules/@jimp/plugin-print/dist/esm/dirname.js +0 -6
  671. package/node_modules/@jimp/plugin-print/dist/esm/dirname.js.map +0 -1
  672. package/node_modules/@jimp/plugin-print/dist/esm/fonts.d.ts +0 -14
  673. package/node_modules/@jimp/plugin-print/dist/esm/fonts.d.ts.map +0 -1
  674. package/node_modules/@jimp/plugin-print/dist/esm/fonts.js +0 -17
  675. package/node_modules/@jimp/plugin-print/dist/esm/fonts.js.map +0 -1
  676. package/node_modules/@jimp/plugin-print/dist/esm/index.d.ts +0 -93
  677. package/node_modules/@jimp/plugin-print/dist/esm/index.d.ts.map +0 -1
  678. package/node_modules/@jimp/plugin-print/dist/esm/index.js +0 -146
  679. package/node_modules/@jimp/plugin-print/dist/esm/index.js.map +0 -1
  680. package/node_modules/@jimp/plugin-print/dist/esm/load-bitmap-font.d.ts +0 -134
  681. package/node_modules/@jimp/plugin-print/dist/esm/load-bitmap-font.d.ts.map +0 -1
  682. package/node_modules/@jimp/plugin-print/dist/esm/load-bitmap-font.js +0 -118
  683. package/node_modules/@jimp/plugin-print/dist/esm/load-bitmap-font.js.map +0 -1
  684. package/node_modules/@jimp/plugin-print/dist/esm/load-font.d.ts +0 -131
  685. package/node_modules/@jimp/plugin-print/dist/esm/load-font.d.ts.map +0 -1
  686. package/node_modules/@jimp/plugin-print/dist/esm/load-font.js +0 -28
  687. package/node_modules/@jimp/plugin-print/dist/esm/load-font.js.map +0 -1
  688. package/node_modules/@jimp/plugin-print/dist/esm/measure-text.d.ts +0 -8
  689. package/node_modules/@jimp/plugin-print/dist/esm/measure-text.d.ts.map +0 -1
  690. package/node_modules/@jimp/plugin-print/dist/esm/measure-text.js +0 -70
  691. package/node_modules/@jimp/plugin-print/dist/esm/measure-text.js.map +0 -1
  692. package/node_modules/@jimp/plugin-print/dist/esm/package.json +0 -3
  693. package/node_modules/@jimp/plugin-print/dist/esm/types.d.ts +0 -29
  694. package/node_modules/@jimp/plugin-print/dist/esm/types.d.ts.map +0 -1
  695. package/node_modules/@jimp/plugin-print/dist/esm/types.js +0 -2
  696. package/node_modules/@jimp/plugin-print/dist/esm/types.js.map +0 -1
  697. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/Apache License.txt +0 -201
  698. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt +0 -160
  699. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-10-black/open-sans-10-black.png +0 -0
  700. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt +0 -183
  701. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-12-black/open-sans-12-black.png +0 -0
  702. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt +0 -298
  703. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-128-black/open-sans-128-black.png +0 -0
  704. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt +0 -298
  705. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-128-white/open-sans-128-white.png +0 -0
  706. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt +0 -215
  707. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-14-black/open-sans-14-black.png +0 -0
  708. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt +0 -298
  709. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-16-black/open-sans-16-black.png +0 -0
  710. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt +0 -298
  711. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-16-white/open-sans-16-white.png +0 -0
  712. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt +0 -298
  713. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-32-black/open-sans-32-black.png +0 -0
  714. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt +0 -298
  715. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-32-white/open-sans-32-white.png +0 -0
  716. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt +0 -298
  717. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-64-black/open-sans-64-black.png +0 -0
  718. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt +0 -298
  719. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-64-white/open-sans-64-white.png +0 -0
  720. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt +0 -298
  721. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-8-black/open-sans-8-black.png +0 -0
  722. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt +0 -298
  723. package/node_modules/@jimp/plugin-print/dist/fonts/open-sans/open-sans-8-white/open-sans-8-white.png +0 -0
  724. package/node_modules/@jimp/plugin-print/eslint.config.mjs +0 -2
  725. package/node_modules/@jimp/plugin-print/fonts/open-sans/Apache License.txt +0 -201
  726. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt +0 -160
  727. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-10-black/open-sans-10-black.png +0 -0
  728. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt +0 -183
  729. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-12-black/open-sans-12-black.png +0 -0
  730. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt +0 -298
  731. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-128-black/open-sans-128-black.png +0 -0
  732. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt +0 -298
  733. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-128-white/open-sans-128-white.png +0 -0
  734. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt +0 -215
  735. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-14-black/open-sans-14-black.png +0 -0
  736. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt +0 -298
  737. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-16-black/open-sans-16-black.png +0 -0
  738. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt +0 -298
  739. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-16-white/open-sans-16-white.png +0 -0
  740. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt +0 -298
  741. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-32-black/open-sans-32-black.png +0 -0
  742. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt +0 -298
  743. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-32-white/open-sans-32-white.png +0 -0
  744. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt +0 -298
  745. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-64-black/open-sans-64-black.png +0 -0
  746. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt +0 -298
  747. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-64-white/open-sans-64-white.png +0 -0
  748. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt +0 -298
  749. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-8-black/open-sans-8-black.png +0 -0
  750. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt +0 -298
  751. package/node_modules/@jimp/plugin-print/fonts/open-sans/open-sans-8-white/open-sans-8-white.png +0 -0
  752. package/node_modules/@jimp/plugin-print/package.json +0 -94
  753. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-bottom-align-text-when-passing-object-with-alignment-y-1-snap.png +0 -0
  754. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-bottom-align-text-when-passing-object-with-alignment-y-offset-y-1-snap.png +0 -0
  755. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-center-align-text-when-passing-object-with-alignment-x-1-snap.png +0 -0
  756. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-exposes-print-y-position-in-cb-1-snap.png +0 -0
  757. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-can-print-numbers-too-1-snap.png +0 -0
  758. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-loads-font-from-url-1-snap.png +0 -0
  759. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-16-black-bitmap-font-1-snap.png +0 -0
  760. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-16-black-bitmap-font-positioned-1-snap.png +0 -0
  761. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-16-white-bitmap-font-1-snap.png +0 -0
  762. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-32-black-bitmap-font-1-snap.png +0 -0
  763. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-32-white-bitmap-font-1-snap.png +0 -0
  764. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-64-black-bitmap-font-1-snap.png +0 -0
  765. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-64-white-bitmap-font-1-snap.png +0 -0
  766. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-8-black-bitmap-font-1-snap.png +0 -0
  767. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-preset-sans-8-white-bitmap-font-1-snap.png +0 -0
  768. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-jimp-renders-for-unknown-characters-1-snap.png +0 -0
  769. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-left-align-text-by-default-1-snap.png +0 -0
  770. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-left-align-text-by-default-when-passing-object-1-snap.png +0 -0
  771. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-left-align-text-when-passing-object-with-alignment-x-1-snap.png +0 -0
  772. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-max-width-works-without-spaces-1-snap.png +0 -0
  773. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-middle-align-text-when-passing-object-with-alignment-y-1-snap.png +0 -0
  774. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-middle-align-text-when-passing-object-with-alignment-y-can-offset-y-1-snap.png +0 -0
  775. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-right-align-text-when-passing-object-with-alignment-x-1-snap.png +0 -0
  776. package/node_modules/@jimp/plugin-print/src/__image_snapshots__/index-node-test-ts-write-text-over-image-text-with-newlines-default-alignment-1-snap.png +0 -0
  777. package/node_modules/@jimp/plugin-print/src/dirname-cjs.cts +0 -1
  778. package/node_modules/@jimp/plugin-print/src/dirname.ts +0 -6
  779. package/node_modules/@jimp/plugin-print/src/fonts.ts +0 -69
  780. package/node_modules/@jimp/plugin-print/src/index.node.test.ts +0 -302
  781. package/node_modules/@jimp/plugin-print/src/index.ts +0 -220
  782. package/node_modules/@jimp/plugin-print/src/load-bitmap-font.ts +0 -165
  783. package/node_modules/@jimp/plugin-print/src/load-font.ts +0 -35
  784. package/node_modules/@jimp/plugin-print/src/measure-text.ts +0 -92
  785. package/node_modules/@jimp/plugin-print/src/types/parse-bmfont-ascii.d.ts +0 -4
  786. package/node_modules/@jimp/plugin-print/src/types/parse-bmfont-binary.d.ts +0 -4
  787. package/node_modules/@jimp/plugin-print/src/types/parse-bmfont-xml.d.ts +0 -4
  788. package/node_modules/@jimp/plugin-print/src/types.ts +0 -33
  789. package/node_modules/@jimp/plugin-print/tsconfig.json +0 -6
  790. package/node_modules/@jimp/plugin-quantize/.tshy/build.json +0 -8
  791. package/node_modules/@jimp/plugin-quantize/.tshy/commonjs.json +0 -17
  792. package/node_modules/@jimp/plugin-quantize/.tshy/esm.json +0 -16
  793. package/node_modules/@jimp/plugin-quantize/.turbo/turbo-build.log +0 -5
  794. package/node_modules/@jimp/plugin-quantize/CHANGELOG.md +0 -50
  795. package/node_modules/@jimp/plugin-quantize/LICENSE +0 -21
  796. package/node_modules/@jimp/plugin-quantize/README.md +0 -8
  797. package/node_modules/@jimp/plugin-quantize/dist/commonjs/index.d.ts +0 -27
  798. package/node_modules/@jimp/plugin-quantize/dist/commonjs/index.d.ts.map +0 -1
  799. package/node_modules/@jimp/plugin-quantize/dist/commonjs/index.js +0 -70
  800. package/node_modules/@jimp/plugin-quantize/dist/commonjs/index.js.map +0 -1
  801. package/node_modules/@jimp/plugin-quantize/dist/commonjs/package.json +0 -3
  802. package/node_modules/@jimp/plugin-quantize/dist/esm/index.d.ts +0 -27
  803. package/node_modules/@jimp/plugin-quantize/dist/esm/index.d.ts.map +0 -1
  804. package/node_modules/@jimp/plugin-quantize/dist/esm/index.js +0 -64
  805. package/node_modules/@jimp/plugin-quantize/dist/esm/index.js.map +0 -1
  806. package/node_modules/@jimp/plugin-quantize/dist/esm/package.json +0 -3
  807. package/node_modules/@jimp/plugin-quantize/eslint.config.mjs +0 -2
  808. package/node_modules/@jimp/plugin-quantize/package.json +0 -66
  809. package/node_modules/@jimp/plugin-quantize/src/__image_snapshots__/index-node-test-ts-quantize-defines-default-threshold-for-lighter-backgrounds-1-snap.png +0 -0
  810. package/node_modules/@jimp/plugin-quantize/src/images/colorful.png +0 -0
  811. package/node_modules/@jimp/plugin-quantize/src/index.node.test.ts +0 -23
  812. package/node_modules/@jimp/plugin-quantize/src/index.ts +0 -81
  813. package/node_modules/@jimp/plugin-quantize/tsconfig.json +0 -6
  814. package/node_modules/@jimp/plugin-resize/.tshy/build.json +0 -8
  815. package/node_modules/@jimp/plugin-resize/.tshy/commonjs.json +0 -17
  816. package/node_modules/@jimp/plugin-resize/.tshy/esm.json +0 -16
  817. package/node_modules/@jimp/plugin-resize/.turbo/turbo-build.log +0 -5
  818. package/node_modules/@jimp/plugin-resize/CHANGELOG.md +0 -52
  819. package/node_modules/@jimp/plugin-resize/LICENSE +0 -21
  820. package/node_modules/@jimp/plugin-resize/README.md +0 -12
  821. package/node_modules/@jimp/plugin-resize/dist/commonjs/constants.d.ts +0 -27
  822. package/node_modules/@jimp/plugin-resize/dist/commonjs/constants.d.ts.map +0 -1
  823. package/node_modules/@jimp/plugin-resize/dist/commonjs/constants.js +0 -31
  824. package/node_modules/@jimp/plugin-resize/dist/commonjs/constants.js.map +0 -1
  825. package/node_modules/@jimp/plugin-resize/dist/commonjs/index.d.ts +0 -111
  826. package/node_modules/@jimp/plugin-resize/dist/commonjs/index.d.ts.map +0 -1
  827. package/node_modules/@jimp/plugin-resize/dist/commonjs/index.js +0 -150
  828. package/node_modules/@jimp/plugin-resize/dist/commonjs/index.js.map +0 -1
  829. package/node_modules/@jimp/plugin-resize/dist/commonjs/modules/resize.d.ts +0 -3
  830. package/node_modules/@jimp/plugin-resize/dist/commonjs/modules/resize.d.ts.map +0 -1
  831. package/node_modules/@jimp/plugin-resize/dist/commonjs/modules/resize.js +0 -412
  832. package/node_modules/@jimp/plugin-resize/dist/commonjs/modules/resize.js.map +0 -1
  833. package/node_modules/@jimp/plugin-resize/dist/commonjs/modules/resize2.d.ts +0 -30
  834. package/node_modules/@jimp/plugin-resize/dist/commonjs/modules/resize2.d.ts.map +0 -1
  835. package/node_modules/@jimp/plugin-resize/dist/commonjs/modules/resize2.js +0 -251
  836. package/node_modules/@jimp/plugin-resize/dist/commonjs/modules/resize2.js.map +0 -1
  837. package/node_modules/@jimp/plugin-resize/dist/commonjs/package.json +0 -3
  838. package/node_modules/@jimp/plugin-resize/dist/esm/constants.d.ts +0 -27
  839. package/node_modules/@jimp/plugin-resize/dist/esm/constants.d.ts.map +0 -1
  840. package/node_modules/@jimp/plugin-resize/dist/esm/constants.js +0 -28
  841. package/node_modules/@jimp/plugin-resize/dist/esm/constants.js.map +0 -1
  842. package/node_modules/@jimp/plugin-resize/dist/esm/index.d.ts +0 -111
  843. package/node_modules/@jimp/plugin-resize/dist/esm/index.d.ts.map +0 -1
  844. package/node_modules/@jimp/plugin-resize/dist/esm/index.js +0 -130
  845. package/node_modules/@jimp/plugin-resize/dist/esm/index.js.map +0 -1
  846. package/node_modules/@jimp/plugin-resize/dist/esm/modules/resize.d.ts +0 -3
  847. package/node_modules/@jimp/plugin-resize/dist/esm/modules/resize.d.ts.map +0 -1
  848. package/node_modules/@jimp/plugin-resize/dist/esm/modules/resize.js +0 -410
  849. package/node_modules/@jimp/plugin-resize/dist/esm/modules/resize.js.map +0 -1
  850. package/node_modules/@jimp/plugin-resize/dist/esm/modules/resize2.d.ts +0 -30
  851. package/node_modules/@jimp/plugin-resize/dist/esm/modules/resize2.d.ts.map +0 -1
  852. package/node_modules/@jimp/plugin-resize/dist/esm/modules/resize2.js +0 -248
  853. package/node_modules/@jimp/plugin-resize/dist/esm/modules/resize2.js.map +0 -1
  854. package/node_modules/@jimp/plugin-resize/dist/esm/package.json +0 -3
  855. package/node_modules/@jimp/plugin-resize/eslint.config.mjs +0 -2
  856. package/node_modules/@jimp/plugin-resize/package.json +0 -67
  857. package/node_modules/@jimp/plugin-resize/src/__snapshots__/index.test.ts.snap +0 -445
  858. package/node_modules/@jimp/plugin-resize/src/constants.ts +0 -26
  859. package/node_modules/@jimp/plugin-resize/src/index.test.ts +0 -101
  860. package/node_modules/@jimp/plugin-resize/src/index.ts +0 -176
  861. package/node_modules/@jimp/plugin-resize/src/modules/resize.ts +0 -555
  862. package/node_modules/@jimp/plugin-resize/src/modules/resize2.ts +0 -327
  863. package/node_modules/@jimp/plugin-resize/tsconfig.json +0 -6
  864. package/node_modules/@jimp/plugin-resize/vitest.config.browser.mjs +0 -3
  865. package/node_modules/@jimp/plugin-rotate/.tshy/build.json +0 -8
  866. package/node_modules/@jimp/plugin-rotate/.tshy/commonjs.json +0 -17
  867. package/node_modules/@jimp/plugin-rotate/.tshy/esm.json +0 -16
  868. package/node_modules/@jimp/plugin-rotate/.turbo/turbo-build.log +0 -5
  869. package/node_modules/@jimp/plugin-rotate/CHANGELOG.md +0 -64
  870. package/node_modules/@jimp/plugin-rotate/LICENSE +0 -21
  871. package/node_modules/@jimp/plugin-rotate/README.md +0 -10
  872. package/node_modules/@jimp/plugin-rotate/dist/commonjs/index.d.ts +0 -32
  873. package/node_modules/@jimp/plugin-rotate/dist/commonjs/index.d.ts.map +0 -1
  874. package/node_modules/@jimp/plugin-rotate/dist/commonjs/index.js +0 -201
  875. package/node_modules/@jimp/plugin-rotate/dist/commonjs/index.js.map +0 -1
  876. package/node_modules/@jimp/plugin-rotate/dist/commonjs/package.json +0 -3
  877. package/node_modules/@jimp/plugin-rotate/dist/esm/index.d.ts +0 -32
  878. package/node_modules/@jimp/plugin-rotate/dist/esm/index.d.ts.map +0 -1
  879. package/node_modules/@jimp/plugin-rotate/dist/esm/index.js +0 -198
  880. package/node_modules/@jimp/plugin-rotate/dist/esm/index.js.map +0 -1
  881. package/node_modules/@jimp/plugin-rotate/dist/esm/package.json +0 -3
  882. package/node_modules/@jimp/plugin-rotate/eslint.config.mjs +0 -2
  883. package/node_modules/@jimp/plugin-rotate/package.json +0 -71
  884. package/node_modules/@jimp/plugin-rotate/src/__snapshots__/index.test.ts.snap +0 -897
  885. package/node_modules/@jimp/plugin-rotate/src/index.test.ts +0 -84
  886. package/node_modules/@jimp/plugin-rotate/src/index.ts +0 -256
  887. package/node_modules/@jimp/plugin-rotate/tsconfig.json +0 -6
  888. package/node_modules/@jimp/plugin-rotate/vitest.config.browser.mjs +0 -3
  889. package/node_modules/@jimp/plugin-threshold/.tshy/build.json +0 -8
  890. package/node_modules/@jimp/plugin-threshold/.tshy/commonjs.json +0 -17
  891. package/node_modules/@jimp/plugin-threshold/.tshy/esm.json +0 -16
  892. package/node_modules/@jimp/plugin-threshold/.turbo/turbo-build.log +0 -5
  893. package/node_modules/@jimp/plugin-threshold/CHANGELOG.md +0 -52
  894. package/node_modules/@jimp/plugin-threshold/LICENSE +0 -21
  895. package/node_modules/@jimp/plugin-threshold/README.md +0 -10
  896. package/node_modules/@jimp/plugin-threshold/dist/commonjs/index.d.ts +0 -36
  897. package/node_modules/@jimp/plugin-threshold/dist/commonjs/index.d.ts.map +0 -1
  898. package/node_modules/@jimp/plugin-threshold/dist/commonjs/index.js +0 -46
  899. package/node_modules/@jimp/plugin-threshold/dist/commonjs/index.js.map +0 -1
  900. package/node_modules/@jimp/plugin-threshold/dist/commonjs/package.json +0 -3
  901. package/node_modules/@jimp/plugin-threshold/dist/esm/index.d.ts +0 -36
  902. package/node_modules/@jimp/plugin-threshold/dist/esm/index.d.ts.map +0 -1
  903. package/node_modules/@jimp/plugin-threshold/dist/esm/index.js +0 -43
  904. package/node_modules/@jimp/plugin-threshold/dist/esm/index.js.map +0 -1
  905. package/node_modules/@jimp/plugin-threshold/dist/esm/package.json +0 -3
  906. package/node_modules/@jimp/plugin-threshold/eslint.config.mjs +0 -2
  907. package/node_modules/@jimp/plugin-threshold/package.json +0 -70
  908. package/node_modules/@jimp/plugin-threshold/src/__image_snapshots__/index-test-ts-src-index-test-ts-threshold-defines-default-threshold-for-lighter-backgrounds-1-snap.png +0 -0
  909. package/node_modules/@jimp/plugin-threshold/src/index.test.ts +0 -23
  910. package/node_modules/@jimp/plugin-threshold/src/index.ts +0 -56
  911. package/node_modules/@jimp/plugin-threshold/tsconfig.json +0 -6
  912. package/node_modules/@jimp/plugin-threshold/vitest.config.browser.mjs +0 -3
  913. package/node_modules/@jimp/types/.tshy/build.json +0 -8
  914. package/node_modules/@jimp/types/.tshy/commonjs.json +0 -17
  915. package/node_modules/@jimp/types/.tshy/esm.json +0 -16
  916. package/node_modules/@jimp/types/.turbo/turbo-build.log +0 -5
  917. package/node_modules/@jimp/types/CHANGELOG.md +0 -97
  918. package/node_modules/@jimp/types/LICENSE +0 -21
  919. package/node_modules/@jimp/types/dist/commonjs/index.d.ts +0 -66
  920. package/node_modules/@jimp/types/dist/commonjs/index.d.ts.map +0 -1
  921. package/node_modules/@jimp/types/dist/commonjs/index.js +0 -18
  922. package/node_modules/@jimp/types/dist/commonjs/index.js.map +0 -1
  923. package/node_modules/@jimp/types/dist/commonjs/package.json +0 -3
  924. package/node_modules/@jimp/types/dist/esm/index.d.ts +0 -66
  925. package/node_modules/@jimp/types/dist/esm/index.d.ts.map +0 -1
  926. package/node_modules/@jimp/types/dist/esm/index.js +0 -15
  927. package/node_modules/@jimp/types/dist/esm/index.js.map +0 -1
  928. package/node_modules/@jimp/types/dist/esm/package.json +0 -3
  929. package/node_modules/@jimp/types/eslint.config.mjs +0 -2
  930. package/node_modules/@jimp/types/package.json +0 -60
  931. package/node_modules/@jimp/types/src/index.ts +0 -76
  932. package/node_modules/@jimp/types/tsconfig.json +0 -6
  933. package/node_modules/@jimp/utils/.tshy/build.json +0 -8
  934. package/node_modules/@jimp/utils/.tshy/commonjs.json +0 -17
  935. package/node_modules/@jimp/utils/.tshy/esm.json +0 -16
  936. package/node_modules/@jimp/utils/.turbo/turbo-build.log +0 -5
  937. package/node_modules/@jimp/utils/CHANGELOG.md +0 -67
  938. package/node_modules/@jimp/utils/LICENSE +0 -21
  939. package/node_modules/@jimp/utils/dist/commonjs/index.d.ts +0 -85
  940. package/node_modules/@jimp/utils/dist/commonjs/index.d.ts.map +0 -1
  941. package/node_modules/@jimp/utils/dist/commonjs/index.js +0 -225
  942. package/node_modules/@jimp/utils/dist/commonjs/index.js.map +0 -1
  943. package/node_modules/@jimp/utils/dist/commonjs/package.json +0 -3
  944. package/node_modules/@jimp/utils/dist/esm/index.d.ts +0 -85
  945. package/node_modules/@jimp/utils/dist/esm/index.d.ts.map +0 -1
  946. package/node_modules/@jimp/utils/dist/esm/index.js +0 -212
  947. package/node_modules/@jimp/utils/dist/esm/index.js.map +0 -1
  948. package/node_modules/@jimp/utils/dist/esm/package.json +0 -3
  949. package/node_modules/@jimp/utils/eslint.config.mjs +0 -2
  950. package/node_modules/@jimp/utils/package.json +0 -63
  951. package/node_modules/@jimp/utils/src/index.test.ts +0 -82
  952. package/node_modules/@jimp/utils/src/index.ts +0 -271
  953. package/node_modules/@jimp/utils/tsconfig.json +0 -6
  954. package/node_modules/@types/node/LICENSE +0 -21
  955. package/node_modules/@types/node/README.md +0 -16
  956. package/node_modules/@types/node/assert/strict.d.ts +0 -8
  957. package/node_modules/@types/node/assert.d.ts +0 -912
  958. package/node_modules/@types/node/async_hooks.d.ts +0 -497
  959. package/node_modules/@types/node/buffer.d.ts +0 -2142
  960. package/node_modules/@types/node/child_process.d.ts +0 -1355
  961. package/node_modules/@types/node/cluster.d.ts +0 -414
  962. package/node_modules/@types/node/console.d.ts +0 -407
  963. package/node_modules/@types/node/constants.d.ts +0 -18
  964. package/node_modules/@types/node/crypto.d.ts +0 -3243
  965. package/node_modules/@types/node/dgram.d.ts +0 -545
  966. package/node_modules/@types/node/diagnostics_channel.d.ts +0 -128
  967. package/node_modules/@types/node/dns/promises.d.ts +0 -357
  968. package/node_modules/@types/node/dns.d.ts +0 -643
  969. package/node_modules/@types/node/domain.d.ts +0 -169
  970. package/node_modules/@types/node/events.d.ts +0 -623
  971. package/node_modules/@types/node/fs/promises.d.ts +0 -997
  972. package/node_modules/@types/node/fs.d.ts +0 -3723
  973. package/node_modules/@types/node/globals.d.ts +0 -284
  974. package/node_modules/@types/node/globals.global.d.ts +0 -1
  975. package/node_modules/@types/node/http.d.ts +0 -1358
  976. package/node_modules/@types/node/http2.d.ts +0 -2100
  977. package/node_modules/@types/node/https.d.ts +0 -391
  978. package/node_modules/@types/node/index.d.ts +0 -132
  979. package/node_modules/@types/node/inspector.d.ts +0 -2738
  980. package/node_modules/@types/node/module.d.ts +0 -114
  981. package/node_modules/@types/node/net.d.ts +0 -783
  982. package/node_modules/@types/node/os.d.ts +0 -455
  983. package/node_modules/@types/node/package.json +0 -235
  984. package/node_modules/@types/node/path.d.ts +0 -172
  985. package/node_modules/@types/node/perf_hooks.d.ts +0 -555
  986. package/node_modules/@types/node/process.d.ts +0 -1477
  987. package/node_modules/@types/node/punycode.d.ts +0 -117
  988. package/node_modules/@types/node/querystring.d.ts +0 -131
  989. package/node_modules/@types/node/readline.d.ts +0 -542
  990. package/node_modules/@types/node/repl.d.ts +0 -424
  991. package/node_modules/@types/node/stream/consumers.d.ts +0 -24
  992. package/node_modules/@types/node/stream/promises.d.ts +0 -42
  993. package/node_modules/@types/node/stream/web.d.ts +0 -6
  994. package/node_modules/@types/node/stream.d.ts +0 -1218
  995. package/node_modules/@types/node/string_decoder.d.ts +0 -67
  996. package/node_modules/@types/node/timers/promises.d.ts +0 -68
  997. package/node_modules/@types/node/timers.d.ts +0 -94
  998. package/node_modules/@types/node/tls.d.ts +0 -1019
  999. package/node_modules/@types/node/trace_events.d.ts +0 -161
  1000. package/node_modules/@types/node/tty.d.ts +0 -206
  1001. package/node_modules/@types/node/url.d.ts +0 -798
  1002. package/node_modules/@types/node/util.d.ts +0 -1564
  1003. package/node_modules/@types/node/v8.d.ts +0 -378
  1004. package/node_modules/@types/node/vm.d.ts +0 -508
  1005. package/node_modules/@types/node/wasi.d.ts +0 -153
  1006. package/node_modules/@types/node/worker_threads.d.ts +0 -649
  1007. package/node_modules/@types/node/zlib.d.ts +0 -517
  1008. package/node_modules/any-base/LICENSE +0 -21
  1009. package/node_modules/any-base/README.md +0 -55
  1010. package/node_modules/any-base/dist/any-base.js +0 -94
  1011. package/node_modules/any-base/dist/any-base.min.js +0 -1
  1012. package/node_modules/any-base/index.js +0 -30
  1013. package/node_modules/any-base/package.json +0 -40
  1014. package/node_modules/any-base/src/converter.js +0 -80
  1015. package/node_modules/await-to-js/LICENSE +0 -7
  1016. package/node_modules/await-to-js/README.md +0 -82
  1017. package/node_modules/await-to-js/dist/await-to-js.es5.js +0 -19
  1018. package/node_modules/await-to-js/dist/await-to-js.es5.js.map +0 -1
  1019. package/node_modules/await-to-js/dist/await-to-js.umd.js +0 -29
  1020. package/node_modules/await-to-js/dist/await-to-js.umd.js.map +0 -1
  1021. package/node_modules/await-to-js/dist/docs/assets/css/main.css +0 -865
  1022. package/node_modules/await-to-js/dist/docs/assets/css/main.css.map +0 -7
  1023. package/node_modules/await-to-js/dist/docs/assets/images/icons.png +0 -0
  1024. package/node_modules/await-to-js/dist/docs/assets/images/icons@2x.png +0 -0
  1025. package/node_modules/await-to-js/dist/docs/assets/images/widgets.png +0 -0
  1026. package/node_modules/await-to-js/dist/docs/assets/images/widgets@2x.png +0 -0
  1027. package/node_modules/await-to-js/dist/docs/assets/js/main.js +0 -5
  1028. package/node_modules/await-to-js/dist/docs/assets/js/search.js +0 -3
  1029. package/node_modules/await-to-js/dist/docs/globals.html +0 -1060
  1030. package/node_modules/await-to-js/dist/docs/index.html +0 -1061
  1031. package/node_modules/await-to-js/dist/docs/modules/_await_to_js_.html +0 -1047
  1032. package/node_modules/await-to-js/dist/types/await-to-js.d.ts +0 -7
  1033. package/node_modules/await-to-js/package.json +0 -107
  1034. package/node_modules/bmp-ts/LICENSE +0 -21
  1035. package/node_modules/bmp-ts/README.md +0 -130
  1036. package/node_modules/bmp-ts/dist/commonjs/decoder.d.ts +0 -50
  1037. package/node_modules/bmp-ts/dist/commonjs/decoder.js +0 -408
  1038. package/node_modules/bmp-ts/dist/commonjs/decoder.js.map +0 -1
  1039. package/node_modules/bmp-ts/dist/commonjs/encoder.d.ts +0 -38
  1040. package/node_modules/bmp-ts/dist/commonjs/encoder.js +0 -269
  1041. package/node_modules/bmp-ts/dist/commonjs/encoder.js.map +0 -1
  1042. package/node_modules/bmp-ts/dist/commonjs/header-types.d.ts +0 -8
  1043. package/node_modules/bmp-ts/dist/commonjs/header-types.js +0 -12
  1044. package/node_modules/bmp-ts/dist/commonjs/header-types.js.map +0 -1
  1045. package/node_modules/bmp-ts/dist/commonjs/index.d.ts +0 -7
  1046. package/node_modules/bmp-ts/dist/commonjs/index.js +0 -32
  1047. package/node_modules/bmp-ts/dist/commonjs/index.js.map +0 -1
  1048. package/node_modules/bmp-ts/dist/commonjs/mask-color.d.ts +0 -6
  1049. package/node_modules/bmp-ts/dist/commonjs/mask-color.js +0 -61
  1050. package/node_modules/bmp-ts/dist/commonjs/mask-color.js.map +0 -1
  1051. package/node_modules/bmp-ts/dist/commonjs/package.json +0 -3
  1052. package/node_modules/bmp-ts/dist/commonjs/types.d.ts +0 -67
  1053. package/node_modules/bmp-ts/dist/commonjs/types.js +0 -12
  1054. package/node_modules/bmp-ts/dist/commonjs/types.js.map +0 -1
  1055. package/node_modules/bmp-ts/dist/esm/decoder.d.ts +0 -50
  1056. package/node_modules/bmp-ts/dist/esm/decoder.js +0 -402
  1057. package/node_modules/bmp-ts/dist/esm/decoder.js.map +0 -1
  1058. package/node_modules/bmp-ts/dist/esm/encoder.d.ts +0 -38
  1059. package/node_modules/bmp-ts/dist/esm/encoder.js +0 -263
  1060. package/node_modules/bmp-ts/dist/esm/encoder.js.map +0 -1
  1061. package/node_modules/bmp-ts/dist/esm/header-types.d.ts +0 -8
  1062. package/node_modules/bmp-ts/dist/esm/header-types.js +0 -10
  1063. package/node_modules/bmp-ts/dist/esm/header-types.js.map +0 -1
  1064. package/node_modules/bmp-ts/dist/esm/index.d.ts +0 -7
  1065. package/node_modules/bmp-ts/dist/esm/index.js +0 -10
  1066. package/node_modules/bmp-ts/dist/esm/index.js.map +0 -1
  1067. package/node_modules/bmp-ts/dist/esm/mask-color.d.ts +0 -6
  1068. package/node_modules/bmp-ts/dist/esm/mask-color.js +0 -58
  1069. package/node_modules/bmp-ts/dist/esm/mask-color.js.map +0 -1
  1070. package/node_modules/bmp-ts/dist/esm/package.json +0 -3
  1071. package/node_modules/bmp-ts/dist/esm/types.d.ts +0 -67
  1072. package/node_modules/bmp-ts/dist/esm/types.js +0 -9
  1073. package/node_modules/bmp-ts/dist/esm/types.js.map +0 -1
  1074. package/node_modules/bmp-ts/package.json +0 -73
  1075. package/node_modules/exif-parser/.npmignore +0 -2
  1076. package/node_modules/exif-parser/CHANGELOG.md +0 -16
  1077. package/node_modules/exif-parser/LICENSE.md +0 -23
  1078. package/node_modules/exif-parser/Makefile +0 -16
  1079. package/node_modules/exif-parser/README.md +0 -83
  1080. package/node_modules/exif-parser/browser-global.js +0 -3
  1081. package/node_modules/exif-parser/cmd/extract-thumbnail.js +0 -16
  1082. package/node_modules/exif-parser/cmd/list.js +0 -9
  1083. package/node_modules/exif-parser/index.js +0 -18
  1084. package/node_modules/exif-parser/lib/bufferstream.js +0 -88
  1085. package/node_modules/exif-parser/lib/date.js +0 -84
  1086. package/node_modules/exif-parser/lib/dom-bufferstream.js +0 -98
  1087. package/node_modules/exif-parser/lib/exif-tags.js +0 -468
  1088. package/node_modules/exif-parser/lib/exif.js +0 -165
  1089. package/node_modules/exif-parser/lib/jpeg.js +0 -66
  1090. package/node_modules/exif-parser/lib/parser.js +0 -204
  1091. package/node_modules/exif-parser/lib/simplify.js +0 -79
  1092. package/node_modules/exif-parser/package.json +0 -23
  1093. package/node_modules/exif-parser/test/expected-exif-tags.json +0 -364
  1094. package/node_modules/exif-parser/test/starfish.jpg +0 -0
  1095. package/node_modules/exif-parser/test/test-date.js +0 -60
  1096. package/node_modules/exif-parser/test/test-exif.js +0 -26
  1097. package/node_modules/exif-parser/test/test-jpeg.js +0 -46
  1098. package/node_modules/exif-parser/test/test-simplify.js +0 -24
  1099. package/node_modules/exif-parser/test/test.jpg +0 -0
  1100. package/node_modules/gifwrap/.jshintrc +0 -4
  1101. package/node_modules/gifwrap/LICENSE +0 -21
  1102. package/node_modules/gifwrap/README.md +0 -668
  1103. package/node_modules/gifwrap/index.d.ts +0 -153
  1104. package/node_modules/gifwrap/package.json +0 -39
  1105. package/node_modules/gifwrap/src/bitmapimage.js +0 -310
  1106. package/node_modules/gifwrap/src/gif.js +0 -69
  1107. package/node_modules/gifwrap/src/gifcodec.js +0 -404
  1108. package/node_modules/gifwrap/src/gifframe.js +0 -114
  1109. package/node_modules/gifwrap/src/gifutil.js +0 -373
  1110. package/node_modules/gifwrap/src/index.js +0 -16
  1111. package/node_modules/gifwrap/src/omggif.d.ts +0 -56
  1112. package/node_modules/gifwrap/templates/README.hbs +0 -267
  1113. package/node_modules/gifwrap/test/fixtures/count5x7.gif +0 -0
  1114. package/node_modules/gifwrap/test/fixtures/countConstantDelay0.gif +0 -0
  1115. package/node_modules/gifwrap/test/fixtures/countConstantDelay1.gif +0 -0
  1116. package/node_modules/gifwrap/test/fixtures/countConstantDelay3.gif +0 -0
  1117. package/node_modules/gifwrap/test/fixtures/countIncreasingDelay.gif +0 -0
  1118. package/node_modules/gifwrap/test/fixtures/hairstreak.jpg +0 -0
  1119. package/node_modules/gifwrap/test/fixtures/lenna.png +0 -0
  1120. package/node_modules/gifwrap/test/fixtures/nburling-public.gif +0 -0
  1121. package/node_modules/gifwrap/test/fixtures/pelagrina.jpg +0 -0
  1122. package/node_modules/gifwrap/test/fixtures/penguins.png +0 -0
  1123. package/node_modules/gifwrap/test/fixtures/quantized/hairstreak256_Dekker.png +0 -0
  1124. package/node_modules/gifwrap/test/fixtures/quantized/hairstreak256_Sorokin.png +0 -0
  1125. package/node_modules/gifwrap/test/fixtures/quantized/hairstreak256_Wu.png +0 -0
  1126. package/node_modules/gifwrap/test/fixtures/quantized/hairstreak32_Dekker.png +0 -0
  1127. package/node_modules/gifwrap/test/fixtures/quantized/hairstreak32_Sorokin.png +0 -0
  1128. package/node_modules/gifwrap/test/fixtures/quantized/hairstreak32_Wu.png +0 -0
  1129. package/node_modules/gifwrap/test/fixtures/quantized/rosewithtrans256_Dekker.png +0 -0
  1130. package/node_modules/gifwrap/test/fixtures/quantized/rosewithtrans256_Sorokin.png +0 -0
  1131. package/node_modules/gifwrap/test/fixtures/quantized/rosewithtrans256_Wu.png +0 -0
  1132. package/node_modules/gifwrap/test/fixtures/quantized/rosewithtrans32_Dekker.png +0 -0
  1133. package/node_modules/gifwrap/test/fixtures/quantized/rosewithtrans32_Sorokin.png +0 -0
  1134. package/node_modules/gifwrap/test/fixtures/quantized/rosewithtrans32_Wu.png +0 -0
  1135. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap256_Dekker.png +0 -0
  1136. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap256_Dekker_FloydSteinberg.png +0 -0
  1137. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap256_Sorokin.png +0 -0
  1138. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap256_Sorokin_FloydSteinberg.png +0 -0
  1139. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap256_Wu.png +0 -0
  1140. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap256_Wu_FloydSteinberg.png +0 -0
  1141. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap32_Dekker.png +0 -0
  1142. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap32_Sorokin.png +0 -0
  1143. package/node_modules/gifwrap/test/fixtures/quantized/sculptmap32_Wu.png +0 -0
  1144. package/node_modules/gifwrap/test/fixtures/rnaples-frame-10.png +0 -0
  1145. package/node_modules/gifwrap/test/fixtures/rnaples-offsets-public.gif +0 -0
  1146. package/node_modules/gifwrap/test/fixtures/rosewithtrans.png +0 -0
  1147. package/node_modules/gifwrap/test/fixtures/sculptmap.png +0 -0
  1148. package/node_modules/gifwrap/test/fixtures/singleFrameBWOpaque.gif +0 -0
  1149. package/node_modules/gifwrap/test/fixtures/singleFrameMonoOpaque.gif +0 -0
  1150. package/node_modules/gifwrap/test/fixtures/singleFrameMonoTrans.gif +0 -0
  1151. package/node_modules/gifwrap/test/fixtures/singleFrameMultiOpaque.gif +0 -0
  1152. package/node_modules/gifwrap/test/fixtures/singleFrameMultiTrans.gif +0 -0
  1153. package/node_modules/gifwrap/test/fixtures/singleFrameNoColorTrans.gif +0 -0
  1154. package/node_modules/gifwrap/test/fixtures/threeFrameMonoTrans.gif +0 -0
  1155. package/node_modules/gifwrap/test/fixtures/twoFrameMultiOpaque.gif +0 -0
  1156. package/node_modules/gifwrap/test/lib/bitmaps.js +0 -91
  1157. package/node_modules/gifwrap/test/lib/tools.js +0 -202
  1158. package/node_modules/gifwrap/test/test_bitmap.js +0 -157
  1159. package/node_modules/gifwrap/test/test_decoding.js +0 -252
  1160. package/node_modules/gifwrap/test/test_encoding.js +0 -307
  1161. package/node_modules/gifwrap/test/test_frame.js +0 -276
  1162. package/node_modules/gifwrap/test/test_properties.js +0 -277
  1163. package/node_modules/gifwrap/test/test_quantize.js +0 -292
  1164. package/node_modules/image-q/LICENSE +0 -49
  1165. package/node_modules/image-q/README.md +0 -347
  1166. package/node_modules/image-q/dist/cjs/image-q.cjs +0 -2921
  1167. package/node_modules/image-q/dist/cjs/image-q.cjs.map +0 -7
  1168. package/node_modules/image-q/dist/esm/image-q.mjs +0 -2886
  1169. package/node_modules/image-q/dist/esm/image-q.mjs.map +0 -7
  1170. package/node_modules/image-q/dist/types/src/basicAPI.d.ts +0 -22
  1171. package/node_modules/image-q/dist/types/src/basicAPI.d.ts.map +0 -1
  1172. package/node_modules/image-q/dist/types/src/constants/bt709.d.ts +0 -30
  1173. package/node_modules/image-q/dist/types/src/constants/bt709.d.ts.map +0 -1
  1174. package/node_modules/image-q/dist/types/src/constants/index.d.ts +0 -10
  1175. package/node_modules/image-q/dist/types/src/constants/index.d.ts.map +0 -1
  1176. package/node_modules/image-q/dist/types/src/conversion/index.d.ts +0 -15
  1177. package/node_modules/image-q/dist/types/src/conversion/index.d.ts.map +0 -1
  1178. package/node_modules/image-q/dist/types/src/conversion/lab2rgb.d.ts +0 -6
  1179. package/node_modules/image-q/dist/types/src/conversion/lab2rgb.d.ts.map +0 -1
  1180. package/node_modules/image-q/dist/types/src/conversion/lab2xyz.d.ts +0 -6
  1181. package/node_modules/image-q/dist/types/src/conversion/lab2xyz.d.ts.map +0 -1
  1182. package/node_modules/image-q/dist/types/src/conversion/rgb2hsl.d.ts +0 -13
  1183. package/node_modules/image-q/dist/types/src/conversion/rgb2hsl.d.ts.map +0 -1
  1184. package/node_modules/image-q/dist/types/src/conversion/rgb2lab.d.ts +0 -6
  1185. package/node_modules/image-q/dist/types/src/conversion/rgb2lab.d.ts.map +0 -1
  1186. package/node_modules/image-q/dist/types/src/conversion/rgb2xyz.d.ts +0 -6
  1187. package/node_modules/image-q/dist/types/src/conversion/rgb2xyz.d.ts.map +0 -1
  1188. package/node_modules/image-q/dist/types/src/conversion/xyz2lab.d.ts +0 -6
  1189. package/node_modules/image-q/dist/types/src/conversion/xyz2lab.d.ts.map +0 -1
  1190. package/node_modules/image-q/dist/types/src/conversion/xyz2rgb.d.ts +0 -6
  1191. package/node_modules/image-q/dist/types/src/conversion/xyz2rgb.d.ts.map +0 -1
  1192. package/node_modules/image-q/dist/types/src/distance/cie94.d.ts +0 -31
  1193. package/node_modules/image-q/dist/types/src/distance/cie94.d.ts.map +0 -1
  1194. package/node_modules/image-q/dist/types/src/distance/ciede2000.d.ts +0 -45
  1195. package/node_modules/image-q/dist/types/src/distance/ciede2000.d.ts.map +0 -1
  1196. package/node_modules/image-q/dist/types/src/distance/cmetric.d.ts +0 -16
  1197. package/node_modules/image-q/dist/types/src/distance/cmetric.d.ts.map +0 -1
  1198. package/node_modules/image-q/dist/types/src/distance/distanceCalculator.d.ts +0 -26
  1199. package/node_modules/image-q/dist/types/src/distance/distanceCalculator.d.ts.map +0 -1
  1200. package/node_modules/image-q/dist/types/src/distance/euclidean.d.ts +0 -34
  1201. package/node_modules/image-q/dist/types/src/distance/euclidean.d.ts.map +0 -1
  1202. package/node_modules/image-q/dist/types/src/distance/index.d.ts +0 -15
  1203. package/node_modules/image-q/dist/types/src/distance/index.d.ts.map +0 -1
  1204. package/node_modules/image-q/dist/types/src/distance/manhattan.d.ts +0 -35
  1205. package/node_modules/image-q/dist/types/src/distance/manhattan.d.ts.map +0 -1
  1206. package/node_modules/image-q/dist/types/src/distance/pngQuant.d.ts +0 -37
  1207. package/node_modules/image-q/dist/types/src/distance/pngQuant.d.ts.map +0 -1
  1208. package/node_modules/image-q/dist/types/src/image/array.d.ts +0 -41
  1209. package/node_modules/image-q/dist/types/src/image/array.d.ts.map +0 -1
  1210. package/node_modules/image-q/dist/types/src/image/imageQuantizer.d.ts +0 -15
  1211. package/node_modules/image-q/dist/types/src/image/imageQuantizer.d.ts.map +0 -1
  1212. package/node_modules/image-q/dist/types/src/image/imageQuantizerYieldValue.d.ts +0 -6
  1213. package/node_modules/image-q/dist/types/src/image/imageQuantizerYieldValue.d.ts.map +0 -1
  1214. package/node_modules/image-q/dist/types/src/image/index.d.ts +0 -13
  1215. package/node_modules/image-q/dist/types/src/image/index.d.ts.map +0 -1
  1216. package/node_modules/image-q/dist/types/src/image/nearestColor.d.ts +0 -21
  1217. package/node_modules/image-q/dist/types/src/image/nearestColor.d.ts.map +0 -1
  1218. package/node_modules/image-q/dist/types/src/image/riemersma.d.ts +0 -42
  1219. package/node_modules/image-q/dist/types/src/image/riemersma.d.ts.map +0 -1
  1220. package/node_modules/image-q/dist/types/src/image/spaceFillingCurves/hilbertCurve.d.ts +0 -3
  1221. package/node_modules/image-q/dist/types/src/image/spaceFillingCurves/hilbertCurve.d.ts.map +0 -1
  1222. package/node_modules/image-q/dist/types/src/index.d.ts +0 -18
  1223. package/node_modules/image-q/dist/types/src/index.d.ts.map +0 -1
  1224. package/node_modules/image-q/dist/types/src/palette/index.d.ts +0 -15
  1225. package/node_modules/image-q/dist/types/src/palette/index.d.ts.map +0 -1
  1226. package/node_modules/image-q/dist/types/src/palette/neuquant/neuquant.d.ts +0 -66
  1227. package/node_modules/image-q/dist/types/src/palette/neuquant/neuquant.d.ts.map +0 -1
  1228. package/node_modules/image-q/dist/types/src/palette/neuquant/neuquantFloat.d.ts +0 -66
  1229. package/node_modules/image-q/dist/types/src/palette/neuquant/neuquantFloat.d.ts.map +0 -1
  1230. package/node_modules/image-q/dist/types/src/palette/paletteQuantizer.d.ts +0 -15
  1231. package/node_modules/image-q/dist/types/src/palette/paletteQuantizer.d.ts.map +0 -1
  1232. package/node_modules/image-q/dist/types/src/palette/paletteQuantizerYieldValue.d.ts +0 -6
  1233. package/node_modules/image-q/dist/types/src/palette/paletteQuantizerYieldValue.d.ts.map +0 -1
  1234. package/node_modules/image-q/dist/types/src/palette/rgbquant/colorHistogram.d.ts +0 -23
  1235. package/node_modules/image-q/dist/types/src/palette/rgbquant/colorHistogram.d.ts.map +0 -1
  1236. package/node_modules/image-q/dist/types/src/palette/rgbquant/rgbquant.d.ts +0 -16
  1237. package/node_modules/image-q/dist/types/src/palette/rgbquant/rgbquant.d.ts.map +0 -1
  1238. package/node_modules/image-q/dist/types/src/palette/wu/wuQuant.d.ts +0 -79
  1239. package/node_modules/image-q/dist/types/src/palette/wu/wuQuant.d.ts.map +0 -1
  1240. package/node_modules/image-q/dist/types/src/quality/index.d.ts +0 -9
  1241. package/node_modules/image-q/dist/types/src/quality/index.d.ts.map +0 -1
  1242. package/node_modules/image-q/dist/types/src/quality/ssim.d.ts +0 -10
  1243. package/node_modules/image-q/dist/types/src/quality/ssim.d.ts.map +0 -1
  1244. package/node_modules/image-q/dist/types/src/utils/arithmetic.d.ts +0 -8
  1245. package/node_modules/image-q/dist/types/src/utils/arithmetic.d.ts.map +0 -1
  1246. package/node_modules/image-q/dist/types/src/utils/hueStatistics.d.ts +0 -11
  1247. package/node_modules/image-q/dist/types/src/utils/hueStatistics.d.ts.map +0 -1
  1248. package/node_modules/image-q/dist/types/src/utils/index.d.ts +0 -15
  1249. package/node_modules/image-q/dist/types/src/utils/index.d.ts.map +0 -1
  1250. package/node_modules/image-q/dist/types/src/utils/palette.d.ts +0 -25
  1251. package/node_modules/image-q/dist/types/src/utils/palette.d.ts.map +0 -1
  1252. package/node_modules/image-q/dist/types/src/utils/point.d.ts +0 -29
  1253. package/node_modules/image-q/dist/types/src/utils/point.d.ts.map +0 -1
  1254. package/node_modules/image-q/dist/types/src/utils/pointContainer.d.ts +0 -34
  1255. package/node_modules/image-q/dist/types/src/utils/pointContainer.d.ts.map +0 -1
  1256. package/node_modules/image-q/dist/types/src/utils/progressTracker.d.ts +0 -11
  1257. package/node_modules/image-q/dist/types/src/utils/progressTracker.d.ts.map +0 -1
  1258. package/node_modules/image-q/package.json +0 -62
  1259. package/node_modules/image-q/src/basicAPI.ts +0 -287
  1260. package/node_modules/image-q/src/constants/bt709.ts +0 -32
  1261. package/node_modules/image-q/src/constants/index.ts +0 -10
  1262. package/node_modules/image-q/src/conversion/index.ts +0 -14
  1263. package/node_modules/image-q/src/conversion/lab2rgb.ts +0 -14
  1264. package/node_modules/image-q/src/conversion/lab2xyz.ts +0 -26
  1265. package/node_modules/image-q/src/conversion/rgb2hsl.ts +0 -40
  1266. package/node_modules/image-q/src/conversion/rgb2lab.ts +0 -14
  1267. package/node_modules/image-q/src/conversion/rgb2xyz.ts +0 -24
  1268. package/node_modules/image-q/src/conversion/xyz2lab.ts +0 -27
  1269. package/node_modules/image-q/src/conversion/xyz2rgb.ts +0 -26
  1270. package/node_modules/image-q/src/distance/cie94.ts +0 -86
  1271. package/node_modules/image-q/src/distance/ciede2000.ts +0 -178
  1272. package/node_modules/image-q/src/distance/cmetric.ts +0 -38
  1273. package/node_modules/image-q/src/distance/distanceCalculator.ts +0 -66
  1274. package/node_modules/image-q/src/distance/euclidean.ts +0 -75
  1275. package/node_modules/image-q/src/distance/index.ts +0 -24
  1276. package/node_modules/image-q/src/distance/manhattan.ts +0 -77
  1277. package/node_modules/image-q/src/distance/pngQuant.ts +0 -74
  1278. package/node_modules/image-q/src/image/array.ts +0 -317
  1279. package/node_modules/image-q/src/image/imageQuantizer.ts +0 -27
  1280. package/node_modules/image-q/src/image/imageQuantizerYieldValue.ts +0 -6
  1281. package/node_modules/image-q/src/image/index.ts +0 -13
  1282. package/node_modules/image-q/src/image/nearestColor.ts +0 -54
  1283. package/node_modules/image-q/src/image/riemersma.ts +0 -135
  1284. package/node_modules/image-q/src/image/spaceFillingCurves/hilbertCurve.ts +0 -126
  1285. package/node_modules/image-q/src/index.ts +0 -29
  1286. package/node_modules/image-q/src/missing-types.d.ts +0 -1
  1287. package/node_modules/image-q/src/palette/index.ts +0 -14
  1288. package/node_modules/image-q/src/palette/neuquant/neuquant.ts +0 -405
  1289. package/node_modules/image-q/src/palette/neuquant/neuquantFloat.ts +0 -383
  1290. package/node_modules/image-q/src/palette/paletteQuantizer.ts +0 -24
  1291. package/node_modules/image-q/src/palette/paletteQuantizerYieldValue.ts +0 -6
  1292. package/node_modules/image-q/src/palette/rgbquant/colorHistogram.ts +0 -224
  1293. package/node_modules/image-q/src/palette/rgbquant/rgbquant.ts +0 -196
  1294. package/node_modules/image-q/src/palette/wu/wuQuant.ts +0 -1124
  1295. package/node_modules/image-q/src/quality/index.ts +0 -8
  1296. package/node_modules/image-q/src/quality/ssim.ts +0 -145
  1297. package/node_modules/image-q/src/utils/arithmetic.ts +0 -62
  1298. package/node_modules/image-q/src/utils/hueStatistics.ts +0 -88
  1299. package/node_modules/image-q/src/utils/index.ts +0 -22
  1300. package/node_modules/image-q/src/utils/palette.ts +0 -219
  1301. package/node_modules/image-q/src/utils/point.ts +0 -167
  1302. package/node_modules/image-q/src/utils/pointContainer.ts +0 -148
  1303. package/node_modules/image-q/src/utils/progressTracker.ts +0 -31
  1304. package/node_modules/jimp/LICENSE +0 -21
  1305. package/node_modules/jimp/README.md +0 -41
  1306. package/node_modules/jimp/dist/browser/fonts.d.ts +0 -5
  1307. package/node_modules/jimp/dist/browser/fonts.d.ts.map +0 -1
  1308. package/node_modules/jimp/dist/browser/fonts.js +0 -5
  1309. package/node_modules/jimp/dist/browser/fonts.js.map +0 -1
  1310. package/node_modules/jimp/dist/browser/index-browser.d.mts.map +0 -1
  1311. package/node_modules/jimp/dist/browser/index-browser.mjs.map +0 -1
  1312. package/node_modules/jimp/dist/browser/index.d.ts +0 -2
  1313. package/node_modules/jimp/dist/browser/index.js +0 -3
  1314. package/node_modules/jimp/dist/browser/index.js.map +0 -1
  1315. package/node_modules/jimp/dist/browser/package.json +0 -3
  1316. package/node_modules/jimp/dist/commonjs/fonts.d.ts +0 -5
  1317. package/node_modules/jimp/dist/commonjs/fonts.d.ts.map +0 -1
  1318. package/node_modules/jimp/dist/commonjs/fonts.js +0 -21
  1319. package/node_modules/jimp/dist/commonjs/fonts.js.map +0 -1
  1320. package/node_modules/jimp/dist/commonjs/index.d.ts +0 -1764
  1321. package/node_modules/jimp/dist/commonjs/index.d.ts.map +0 -1
  1322. package/node_modules/jimp/dist/commonjs/index.js +0 -187
  1323. package/node_modules/jimp/dist/commonjs/index.js.map +0 -1
  1324. package/node_modules/jimp/dist/commonjs/package.json +0 -3
  1325. package/node_modules/jimp/dist/esm/fonts.d.ts +0 -5
  1326. package/node_modules/jimp/dist/esm/fonts.d.ts.map +0 -1
  1327. package/node_modules/jimp/dist/esm/fonts.js +0 -5
  1328. package/node_modules/jimp/dist/esm/fonts.js.map +0 -1
  1329. package/node_modules/jimp/dist/esm/index.d.ts +0 -1764
  1330. package/node_modules/jimp/dist/esm/index.d.ts.map +0 -1
  1331. package/node_modules/jimp/dist/esm/index.js +0 -140
  1332. package/node_modules/jimp/dist/esm/index.js.map +0 -1
  1333. package/node_modules/jimp/dist/esm/package.json +0 -3
  1334. package/node_modules/jimp/package.json +0 -146
  1335. package/node_modules/jpeg-js/.github/workflows/ci.yml +0 -19
  1336. package/node_modules/jpeg-js/CONTRIBUTING.md +0 -27
  1337. package/node_modules/jpeg-js/LICENSE +0 -25
  1338. package/node_modules/jpeg-js/README.md +0 -176
  1339. package/node_modules/jpeg-js/index.d.ts +0 -36
  1340. package/node_modules/jpeg-js/index.js +0 -7
  1341. package/node_modules/jpeg-js/lib/decoder.js +0 -1151
  1342. package/node_modules/jpeg-js/lib/encoder.js +0 -814
  1343. package/node_modules/jpeg-js/package.json +0 -32
  1344. package/node_modules/mime/CHANGELOG.md +0 -312
  1345. package/node_modules/mime/LICENSE +0 -21
  1346. package/node_modules/mime/Mime.js +0 -97
  1347. package/node_modules/mime/README.md +0 -178
  1348. package/node_modules/mime/cli.js +0 -46
  1349. package/node_modules/mime/index.js +0 -4
  1350. package/node_modules/mime/lite.js +0 -4
  1351. package/node_modules/mime/package.json +0 -52
  1352. package/node_modules/mime/types/other.js +0 -1
  1353. package/node_modules/mime/types/standard.js +0 -1
  1354. package/node_modules/omggif/README +0 -24
  1355. package/node_modules/omggif/example_node.js +0 -116
  1356. package/node_modules/omggif/omggif.js +0 -807
  1357. package/node_modules/omggif/package.json +0 -12
  1358. package/node_modules/omggif/plask_viewer.js +0 -42
  1359. package/node_modules/pako/CHANGELOG.md +0 -164
  1360. package/node_modules/pako/LICENSE +0 -21
  1361. package/node_modules/pako/README.md +0 -191
  1362. package/node_modules/pako/dist/pako.js +0 -6818
  1363. package/node_modules/pako/dist/pako.min.js +0 -1
  1364. package/node_modules/pako/dist/pako_deflate.js +0 -3997
  1365. package/node_modules/pako/dist/pako_deflate.min.js +0 -1
  1366. package/node_modules/pako/dist/pako_inflate.js +0 -3300
  1367. package/node_modules/pako/dist/pako_inflate.min.js +0 -1
  1368. package/node_modules/pako/index.js +0 -14
  1369. package/node_modules/pako/lib/deflate.js +0 -400
  1370. package/node_modules/pako/lib/inflate.js +0 -423
  1371. package/node_modules/pako/lib/utils/common.js +0 -105
  1372. package/node_modules/pako/lib/utils/strings.js +0 -187
  1373. package/node_modules/pako/lib/zlib/README +0 -59
  1374. package/node_modules/pako/lib/zlib/adler32.js +0 -51
  1375. package/node_modules/pako/lib/zlib/constants.js +0 -68
  1376. package/node_modules/pako/lib/zlib/crc32.js +0 -59
  1377. package/node_modules/pako/lib/zlib/deflate.js +0 -1874
  1378. package/node_modules/pako/lib/zlib/gzheader.js +0 -58
  1379. package/node_modules/pako/lib/zlib/inffast.js +0 -345
  1380. package/node_modules/pako/lib/zlib/inflate.js +0 -1556
  1381. package/node_modules/pako/lib/zlib/inftrees.js +0 -343
  1382. package/node_modules/pako/lib/zlib/messages.js +0 -32
  1383. package/node_modules/pako/lib/zlib/trees.js +0 -1222
  1384. package/node_modules/pako/lib/zlib/zstream.js +0 -47
  1385. package/node_modules/pako/package.json +0 -44
  1386. package/node_modules/parse-bmfont-ascii/README.md +0 -56
  1387. package/node_modules/parse-bmfont-ascii/index.js +0 -108
  1388. package/node_modules/parse-bmfont-ascii/package.json +0 -45
  1389. package/node_modules/parse-bmfont-binary/LICENSE.md +0 -21
  1390. package/node_modules/parse-bmfont-binary/README.md +0 -37
  1391. package/node_modules/parse-bmfont-binary/index.js +0 -160
  1392. package/node_modules/parse-bmfont-binary/package.json +0 -42
  1393. package/node_modules/parse-bmfont-xml/LICENSE.md +0 -21
  1394. package/node_modules/parse-bmfont-xml/README.md +0 -74
  1395. package/node_modules/parse-bmfont-xml/lib/browser.js +0 -85
  1396. package/node_modules/parse-bmfont-xml/lib/index.js +0 -49
  1397. package/node_modules/parse-bmfont-xml/lib/parse-attribs.js +0 -29
  1398. package/node_modules/parse-bmfont-xml/package.json +0 -56
  1399. package/node_modules/pixelmatch/LICENSE +0 -15
  1400. package/node_modules/pixelmatch/README.md +0 -110
  1401. package/node_modules/pixelmatch/bin/pixelmatch +0 -42
  1402. package/node_modules/pixelmatch/index.js +0 -236
  1403. package/node_modules/pixelmatch/node_modules/pngjs/LICENSE +0 -20
  1404. package/node_modules/pixelmatch/node_modules/pngjs/README.md +0 -433
  1405. package/node_modules/pixelmatch/node_modules/pngjs/browser.js +0 -18554
  1406. package/node_modules/pixelmatch/node_modules/pngjs/lib/bitmapper.js +0 -267
  1407. package/node_modules/pixelmatch/node_modules/pngjs/lib/bitpacker.js +0 -158
  1408. package/node_modules/pixelmatch/node_modules/pngjs/lib/chunkstream.js +0 -189
  1409. package/node_modules/pixelmatch/node_modules/pngjs/lib/constants.js +0 -32
  1410. package/node_modules/pixelmatch/node_modules/pngjs/lib/crc.js +0 -40
  1411. package/node_modules/pixelmatch/node_modules/pngjs/lib/filter-pack.js +0 -171
  1412. package/node_modules/pixelmatch/node_modules/pngjs/lib/filter-parse-async.js +0 -24
  1413. package/node_modules/pixelmatch/node_modules/pngjs/lib/filter-parse-sync.js +0 -21
  1414. package/node_modules/pixelmatch/node_modules/pngjs/lib/filter-parse.js +0 -177
  1415. package/node_modules/pixelmatch/node_modules/pngjs/lib/format-normaliser.js +0 -93
  1416. package/node_modules/pixelmatch/node_modules/pngjs/lib/interlace.js +0 -95
  1417. package/node_modules/pixelmatch/node_modules/pngjs/lib/packer-async.js +0 -50
  1418. package/node_modules/pixelmatch/node_modules/pngjs/lib/packer-sync.js +0 -56
  1419. package/node_modules/pixelmatch/node_modules/pngjs/lib/packer.js +0 -129
  1420. package/node_modules/pixelmatch/node_modules/pngjs/lib/paeth-predictor.js +0 -16
  1421. package/node_modules/pixelmatch/node_modules/pngjs/lib/parser-async.js +0 -169
  1422. package/node_modules/pixelmatch/node_modules/pngjs/lib/parser-sync.js +0 -112
  1423. package/node_modules/pixelmatch/node_modules/pngjs/lib/parser.js +0 -290
  1424. package/node_modules/pixelmatch/node_modules/pngjs/lib/png-sync.js +0 -12
  1425. package/node_modules/pixelmatch/node_modules/pngjs/lib/png.js +0 -194
  1426. package/node_modules/pixelmatch/node_modules/pngjs/lib/sync-inflate.js +0 -168
  1427. package/node_modules/pixelmatch/node_modules/pngjs/lib/sync-reader.js +0 -45
  1428. package/node_modules/pixelmatch/node_modules/pngjs/package.json +0 -77
  1429. package/node_modules/pixelmatch/package.json +0 -42
  1430. package/node_modules/pngjs/CHANGELOG.md +0 -128
  1431. package/node_modules/pngjs/LICENSE +0 -20
  1432. package/node_modules/pngjs/README.md +0 -287
  1433. package/node_modules/pngjs/browser.js +0 -18985
  1434. package/node_modules/pngjs/lib/bitmapper.js +0 -267
  1435. package/node_modules/pngjs/lib/bitpacker.js +0 -158
  1436. package/node_modules/pngjs/lib/chunkstream.js +0 -189
  1437. package/node_modules/pngjs/lib/constants.js +0 -32
  1438. package/node_modules/pngjs/lib/crc.js +0 -40
  1439. package/node_modules/pngjs/lib/filter-pack.js +0 -171
  1440. package/node_modules/pngjs/lib/filter-parse-async.js +0 -24
  1441. package/node_modules/pngjs/lib/filter-parse-sync.js +0 -21
  1442. package/node_modules/pngjs/lib/filter-parse.js +0 -177
  1443. package/node_modules/pngjs/lib/format-normaliser.js +0 -93
  1444. package/node_modules/pngjs/lib/interlace.js +0 -95
  1445. package/node_modules/pngjs/lib/packer-async.js +0 -50
  1446. package/node_modules/pngjs/lib/packer-sync.js +0 -56
  1447. package/node_modules/pngjs/lib/packer.js +0 -129
  1448. package/node_modules/pngjs/lib/paeth-predictor.js +0 -16
  1449. package/node_modules/pngjs/lib/parser-async.js +0 -169
  1450. package/node_modules/pngjs/lib/parser-sync.js +0 -112
  1451. package/node_modules/pngjs/lib/parser.js +0 -290
  1452. package/node_modules/pngjs/lib/png-sync.js +0 -12
  1453. package/node_modules/pngjs/lib/png.js +0 -194
  1454. package/node_modules/pngjs/lib/sync-inflate.js +0 -168
  1455. package/node_modules/pngjs/lib/sync-reader.js +0 -45
  1456. package/node_modules/pngjs/package.json +0 -76
  1457. package/node_modules/sax/LICENSE.md +0 -55
  1458. package/node_modules/sax/README.md +0 -227
  1459. package/node_modules/sax/lib/sax.js +0 -1848
  1460. package/node_modules/sax/package.json +0 -34
  1461. package/node_modules/simple-xml-to-json/README.md +0 -87
  1462. package/node_modules/simple-xml-to-json/lib/simpleXmlToJson.js +0 -590
  1463. package/node_modules/simple-xml-to-json/lib/simpleXmlToJson.min.js +0 -1
  1464. package/node_modules/simple-xml-to-json/lib/simpleXmlToJson.min.mjs +0 -1
  1465. package/node_modules/simple-xml-to-json/lib/simpleXmlToJson.mjs +0 -591
  1466. package/node_modules/simple-xml-to-json/license +0 -21
  1467. package/node_modules/simple-xml-to-json/package.json +0 -85
  1468. package/node_modules/simple-xml-to-json/typings/simple-xml-to-json.d.ts +0 -15
  1469. package/node_modules/tinycolor2/LICENSE +0 -20
  1470. package/node_modules/tinycolor2/README.md +0 -492
  1471. package/node_modules/tinycolor2/cjs/package.json +0 -3
  1472. package/node_modules/tinycolor2/cjs/test.js +0 -2191
  1473. package/node_modules/tinycolor2/cjs/test_template.js +0 -26
  1474. package/node_modules/tinycolor2/cjs/tinycolor.js +0 -1188
  1475. package/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +0 -807
  1476. package/node_modules/tinycolor2/dist/tinycolor-min.js +0 -5
  1477. package/node_modules/tinycolor2/esm/package.json +0 -3
  1478. package/node_modules/tinycolor2/esm/test.js +0 -2189
  1479. package/node_modules/tinycolor2/esm/test_template.js +0 -24
  1480. package/node_modules/tinycolor2/esm/tinycolor.js +0 -1180
  1481. package/node_modules/tinycolor2/package.json +0 -35
  1482. package/node_modules/tinycolor2/tinycolor.js +0 -1191
  1483. package/node_modules/utif2/LICENSE +0 -21
  1484. package/node_modules/utif2/README.md +0 -86
  1485. package/node_modules/utif2/UTIF.d.ts +0 -72
  1486. package/node_modules/utif2/UTIF.js +0 -1649
  1487. package/node_modules/utif2/package.json +0 -27
  1488. package/node_modules/xml-parse-from-string/LICENSE.md +0 -21
  1489. package/node_modules/xml-parse-from-string/README.md +0 -35
  1490. package/node_modules/xml-parse-from-string/index.js +0 -27
  1491. package/node_modules/xml-parse-from-string/package.json +0 -45
  1492. package/node_modules/xml2js/LICENSE +0 -19
  1493. package/node_modules/xml2js/README.md +0 -507
  1494. package/node_modules/xml2js/lib/bom.js +0 -12
  1495. package/node_modules/xml2js/lib/builder.js +0 -127
  1496. package/node_modules/xml2js/lib/defaults.js +0 -72
  1497. package/node_modules/xml2js/lib/parser.js +0 -385
  1498. package/node_modules/xml2js/lib/processors.js +0 -34
  1499. package/node_modules/xml2js/lib/xml2js.js +0 -39
  1500. package/node_modules/xml2js/package.json +0 -93
  1501. package/node_modules/xmlbuilder/CHANGELOG.md +0 -470
  1502. package/node_modules/xmlbuilder/LICENSE +0 -21
  1503. package/node_modules/xmlbuilder/README.md +0 -86
  1504. package/node_modules/xmlbuilder/appveyor.yml +0 -20
  1505. package/node_modules/xmlbuilder/lib/Derivation.js +0 -10
  1506. package/node_modules/xmlbuilder/lib/DocumentPosition.js +0 -12
  1507. package/node_modules/xmlbuilder/lib/NodeType.js +0 -23
  1508. package/node_modules/xmlbuilder/lib/OperationType.js +0 -11
  1509. package/node_modules/xmlbuilder/lib/Utility.js +0 -83
  1510. package/node_modules/xmlbuilder/lib/WriterState.js +0 -10
  1511. package/node_modules/xmlbuilder/lib/XMLAttribute.js +0 -108
  1512. package/node_modules/xmlbuilder/lib/XMLCData.js +0 -36
  1513. package/node_modules/xmlbuilder/lib/XMLCharacterData.js +0 -79
  1514. package/node_modules/xmlbuilder/lib/XMLComment.js +0 -36
  1515. package/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js +0 -64
  1516. package/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js +0 -16
  1517. package/node_modules/xmlbuilder/lib/XMLDOMImplementation.js +0 -32
  1518. package/node_modules/xmlbuilder/lib/XMLDOMStringList.js +0 -28
  1519. package/node_modules/xmlbuilder/lib/XMLDTDAttList.js +0 -55
  1520. package/node_modules/xmlbuilder/lib/XMLDTDElement.js +0 -38
  1521. package/node_modules/xmlbuilder/lib/XMLDTDEntity.js +0 -97
  1522. package/node_modules/xmlbuilder/lib/XMLDTDNotation.js +0 -52
  1523. package/node_modules/xmlbuilder/lib/XMLDeclaration.js +0 -43
  1524. package/node_modules/xmlbuilder/lib/XMLDocType.js +0 -186
  1525. package/node_modules/xmlbuilder/lib/XMLDocument.js +0 -242
  1526. package/node_modules/xmlbuilder/lib/XMLDocumentCB.js +0 -528
  1527. package/node_modules/xmlbuilder/lib/XMLDocumentFragment.js +0 -24
  1528. package/node_modules/xmlbuilder/lib/XMLDummy.js +0 -31
  1529. package/node_modules/xmlbuilder/lib/XMLElement.js +0 -298
  1530. package/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js +0 -58
  1531. package/node_modules/xmlbuilder/lib/XMLNode.js +0 -785
  1532. package/node_modules/xmlbuilder/lib/XMLNodeFilter.js +0 -48
  1533. package/node_modules/xmlbuilder/lib/XMLNodeList.js +0 -28
  1534. package/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +0 -49
  1535. package/node_modules/xmlbuilder/lib/XMLRaw.js +0 -35
  1536. package/node_modules/xmlbuilder/lib/XMLStreamWriter.js +0 -176
  1537. package/node_modules/xmlbuilder/lib/XMLStringWriter.js +0 -35
  1538. package/node_modules/xmlbuilder/lib/XMLStringifier.js +0 -240
  1539. package/node_modules/xmlbuilder/lib/XMLText.js +0 -69
  1540. package/node_modules/xmlbuilder/lib/XMLTypeInfo.js +0 -21
  1541. package/node_modules/xmlbuilder/lib/XMLUserDataHandler.js +0 -16
  1542. package/node_modules/xmlbuilder/lib/XMLWriterBase.js +0 -428
  1543. package/node_modules/xmlbuilder/lib/index.js +0 -65
  1544. package/node_modules/xmlbuilder/package.json +0 -39
  1545. package/node_modules/xmlbuilder/typings/index.d.ts +0 -153
  1546. package/node_modules/zod/LICENSE +0 -21
  1547. package/node_modules/zod/README.md +0 -208
  1548. package/node_modules/zod/index.cjs +0 -33
  1549. package/node_modules/zod/index.d.cts +0 -4
  1550. package/node_modules/zod/index.d.ts +0 -4
  1551. package/node_modules/zod/index.js +0 -4
  1552. package/node_modules/zod/package.json +0 -118
  1553. package/node_modules/zod/src/index.ts +0 -4
  1554. package/node_modules/zod/src/v3/ZodError.ts +0 -330
  1555. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  1556. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  1557. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  1558. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  1559. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  1560. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  1561. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  1562. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  1563. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  1564. package/node_modules/zod/src/v3/errors.ts +0 -13
  1565. package/node_modules/zod/src/v3/external.ts +0 -6
  1566. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  1567. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  1568. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  1569. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  1570. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  1571. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  1572. package/node_modules/zod/src/v3/index.ts +0 -4
  1573. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  1574. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  1575. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  1576. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  1577. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  1578. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  1579. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  1580. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  1581. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  1582. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  1583. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  1584. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  1585. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  1586. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
  1587. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  1588. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  1589. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  1590. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  1591. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  1592. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  1593. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  1594. package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
  1595. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  1596. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  1597. package/node_modules/zod/src/v3/tests/function.test.ts +0 -257
  1598. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  1599. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  1600. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  1601. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  1602. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  1603. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  1604. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  1605. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  1606. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  1607. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
  1608. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  1609. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  1610. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  1611. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  1612. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  1613. package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
  1614. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  1615. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  1616. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  1617. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  1618. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  1619. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  1620. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  1621. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  1622. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  1623. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  1624. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  1625. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  1626. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  1627. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  1628. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  1629. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  1630. package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
  1631. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  1632. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  1633. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  1634. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  1635. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  1636. package/node_modules/zod/src/v3/types.ts +0 -5136
  1637. package/node_modules/zod/src/v4/classic/checks.ts +0 -30
  1638. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  1639. package/node_modules/zod/src/v4/classic/compat.ts +0 -66
  1640. package/node_modules/zod/src/v4/classic/errors.ts +0 -75
  1641. package/node_modules/zod/src/v4/classic/external.ts +0 -50
  1642. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  1643. package/node_modules/zod/src/v4/classic/iso.ts +0 -90
  1644. package/node_modules/zod/src/v4/classic/parse.ts +0 -33
  1645. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2054
  1646. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  1647. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  1648. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
  1649. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  1650. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  1651. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  1652. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  1653. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
  1654. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -252
  1655. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  1656. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  1657. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
  1658. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  1659. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
  1660. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -296
  1661. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -313
  1662. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  1663. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -619
  1664. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  1665. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -527
  1666. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  1667. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -91
  1668. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -175
  1669. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -268
  1670. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  1671. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -829
  1672. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
  1673. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
  1674. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
  1675. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  1676. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -92
  1677. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
  1678. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  1679. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  1680. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -86
  1681. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  1682. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -247
  1683. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -563
  1684. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -123
  1685. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -147
  1686. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
  1687. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -81
  1688. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -37
  1689. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -298
  1690. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  1691. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  1692. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  1693. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  1694. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -342
  1695. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -356
  1696. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -532
  1697. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
  1698. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -179
  1699. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
  1700. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -109
  1701. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -881
  1702. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -66
  1703. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -758
  1704. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2314
  1705. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -250
  1706. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
  1707. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -94
  1708. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  1709. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  1710. package/node_modules/zod/src/v4/core/api.ts +0 -1594
  1711. package/node_modules/zod/src/v4/core/checks.ts +0 -1283
  1712. package/node_modules/zod/src/v4/core/config.ts +0 -15
  1713. package/node_modules/zod/src/v4/core/core.ts +0 -134
  1714. package/node_modules/zod/src/v4/core/doc.ts +0 -44
  1715. package/node_modules/zod/src/v4/core/errors.ts +0 -424
  1716. package/node_modules/zod/src/v4/core/function.ts +0 -176
  1717. package/node_modules/zod/src/v4/core/index.ts +0 -15
  1718. package/node_modules/zod/src/v4/core/json-schema.ts +0 -143
  1719. package/node_modules/zod/src/v4/core/parse.ts +0 -94
  1720. package/node_modules/zod/src/v4/core/regexes.ts +0 -135
  1721. package/node_modules/zod/src/v4/core/registries.ts +0 -96
  1722. package/node_modules/zod/src/v4/core/schemas.ts +0 -3842
  1723. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
  1724. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  1725. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  1726. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  1727. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  1728. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  1729. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -977
  1730. package/node_modules/zod/src/v4/core/util.ts +0 -775
  1731. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  1732. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  1733. package/node_modules/zod/src/v4/index.ts +0 -4
  1734. package/node_modules/zod/src/v4/locales/ar.ts +0 -125
  1735. package/node_modules/zod/src/v4/locales/az.ts +0 -121
  1736. package/node_modules/zod/src/v4/locales/be.ts +0 -184
  1737. package/node_modules/zod/src/v4/locales/ca.ts +0 -127
  1738. package/node_modules/zod/src/v4/locales/cs.ts +0 -142
  1739. package/node_modules/zod/src/v4/locales/de.ts +0 -124
  1740. package/node_modules/zod/src/v4/locales/en.ts +0 -127
  1741. package/node_modules/zod/src/v4/locales/eo.ts +0 -125
  1742. package/node_modules/zod/src/v4/locales/es.ts +0 -125
  1743. package/node_modules/zod/src/v4/locales/fa.ts +0 -134
  1744. package/node_modules/zod/src/v4/locales/fi.ts +0 -131
  1745. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
  1746. package/node_modules/zod/src/v4/locales/fr.ts +0 -124
  1747. package/node_modules/zod/src/v4/locales/he.ts +0 -125
  1748. package/node_modules/zod/src/v4/locales/hu.ts +0 -126
  1749. package/node_modules/zod/src/v4/locales/id.ts +0 -125
  1750. package/node_modules/zod/src/v4/locales/index.ts +0 -39
  1751. package/node_modules/zod/src/v4/locales/it.ts +0 -125
  1752. package/node_modules/zod/src/v4/locales/ja.ts +0 -122
  1753. package/node_modules/zod/src/v4/locales/kh.ts +0 -126
  1754. package/node_modules/zod/src/v4/locales/ko.ts +0 -131
  1755. package/node_modules/zod/src/v4/locales/mk.ts +0 -127
  1756. package/node_modules/zod/src/v4/locales/ms.ts +0 -124
  1757. package/node_modules/zod/src/v4/locales/nl.ts +0 -126
  1758. package/node_modules/zod/src/v4/locales/no.ts +0 -124
  1759. package/node_modules/zod/src/v4/locales/ota.ts +0 -125
  1760. package/node_modules/zod/src/v4/locales/pl.ts +0 -126
  1761. package/node_modules/zod/src/v4/locales/ps.ts +0 -133
  1762. package/node_modules/zod/src/v4/locales/pt.ts +0 -123
  1763. package/node_modules/zod/src/v4/locales/ru.ts +0 -184
  1764. package/node_modules/zod/src/v4/locales/sl.ts +0 -126
  1765. package/node_modules/zod/src/v4/locales/sv.ts +0 -127
  1766. package/node_modules/zod/src/v4/locales/ta.ts +0 -125
  1767. package/node_modules/zod/src/v4/locales/th.ts +0 -126
  1768. package/node_modules/zod/src/v4/locales/tr.ts +0 -121
  1769. package/node_modules/zod/src/v4/locales/ua.ts +0 -126
  1770. package/node_modules/zod/src/v4/locales/ur.ts +0 -126
  1771. package/node_modules/zod/src/v4/locales/vi.ts +0 -125
  1772. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
  1773. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
  1774. package/node_modules/zod/src/v4/mini/checks.ts +0 -32
  1775. package/node_modules/zod/src/v4/mini/coerce.ts +0 -22
  1776. package/node_modules/zod/src/v4/mini/external.ts +0 -40
  1777. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  1778. package/node_modules/zod/src/v4/mini/iso.ts +0 -62
  1779. package/node_modules/zod/src/v4/mini/parse.ts +0 -1
  1780. package/node_modules/zod/src/v4/mini/schemas.ts +0 -1579
  1781. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  1782. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
  1783. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  1784. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  1785. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  1786. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
  1787. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -871
  1788. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  1789. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -185
  1790. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  1791. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
  1792. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -299
  1793. package/node_modules/zod/src/v4-mini/index.ts +0 -1
  1794. package/node_modules/zod/v3/ZodError.cjs +0 -138
  1795. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  1796. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  1797. package/node_modules/zod/v3/ZodError.js +0 -133
  1798. package/node_modules/zod/v3/errors.cjs +0 -17
  1799. package/node_modules/zod/v3/errors.d.cts +0 -5
  1800. package/node_modules/zod/v3/errors.d.ts +0 -5
  1801. package/node_modules/zod/v3/errors.js +0 -9
  1802. package/node_modules/zod/v3/external.cjs +0 -22
  1803. package/node_modules/zod/v3/external.d.cts +0 -6
  1804. package/node_modules/zod/v3/external.d.ts +0 -6
  1805. package/node_modules/zod/v3/external.js +0 -6
  1806. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  1807. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  1808. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  1809. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  1810. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  1811. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  1812. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  1813. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  1814. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  1815. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  1816. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  1817. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  1818. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  1819. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  1820. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  1821. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  1822. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  1823. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  1824. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  1825. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  1826. package/node_modules/zod/v3/helpers/util.cjs +0 -137
  1827. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  1828. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  1829. package/node_modules/zod/v3/helpers/util.js +0 -133
  1830. package/node_modules/zod/v3/index.cjs +0 -33
  1831. package/node_modules/zod/v3/index.d.cts +0 -4
  1832. package/node_modules/zod/v3/index.d.ts +0 -4
  1833. package/node_modules/zod/v3/index.js +0 -4
  1834. package/node_modules/zod/v3/locales/en.cjs +0 -111
  1835. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  1836. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  1837. package/node_modules/zod/v3/locales/en.js +0 -109
  1838. package/node_modules/zod/v3/standard-schema.cjs +0 -2
  1839. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  1840. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  1841. package/node_modules/zod/v3/standard-schema.js +0 -1
  1842. package/node_modules/zod/v3/types.cjs +0 -3775
  1843. package/node_modules/zod/v3/types.d.cts +0 -1031
  1844. package/node_modules/zod/v3/types.d.ts +0 -1031
  1845. package/node_modules/zod/v3/types.js +0 -3693
  1846. package/node_modules/zod/v4/classic/checks.cjs +0 -32
  1847. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  1848. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  1849. package/node_modules/zod/v4/classic/checks.js +0 -1
  1850. package/node_modules/zod/v4/classic/coerce.cjs +0 -47
  1851. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  1852. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  1853. package/node_modules/zod/v4/classic/coerce.js +0 -17
  1854. package/node_modules/zod/v4/classic/compat.cjs +0 -57
  1855. package/node_modules/zod/v4/classic/compat.d.cts +0 -46
  1856. package/node_modules/zod/v4/classic/compat.d.ts +0 -46
  1857. package/node_modules/zod/v4/classic/compat.js +0 -27
  1858. package/node_modules/zod/v4/classic/errors.cjs +0 -67
  1859. package/node_modules/zod/v4/classic/errors.d.cts +0 -30
  1860. package/node_modules/zod/v4/classic/errors.d.ts +0 -30
  1861. package/node_modules/zod/v4/classic/errors.js +0 -41
  1862. package/node_modules/zod/v4/classic/external.cjs +0 -70
  1863. package/node_modules/zod/v4/classic/external.d.cts +0 -13
  1864. package/node_modules/zod/v4/classic/external.d.ts +0 -13
  1865. package/node_modules/zod/v4/classic/external.js +0 -18
  1866. package/node_modules/zod/v4/classic/index.cjs +0 -33
  1867. package/node_modules/zod/v4/classic/index.d.cts +0 -4
  1868. package/node_modules/zod/v4/classic/index.d.ts +0 -4
  1869. package/node_modules/zod/v4/classic/index.js +0 -4
  1870. package/node_modules/zod/v4/classic/iso.cjs +0 -60
  1871. package/node_modules/zod/v4/classic/iso.d.cts +0 -22
  1872. package/node_modules/zod/v4/classic/iso.d.ts +0 -22
  1873. package/node_modules/zod/v4/classic/iso.js +0 -30
  1874. package/node_modules/zod/v4/classic/parse.cjs +0 -32
  1875. package/node_modules/zod/v4/classic/parse.d.cts +0 -23
  1876. package/node_modules/zod/v4/classic/parse.d.ts +0 -23
  1877. package/node_modules/zod/v4/classic/parse.js +0 -6
  1878. package/node_modules/zod/v4/classic/schemas.cjs +0 -1109
  1879. package/node_modules/zod/v4/classic/schemas.d.cts +0 -630
  1880. package/node_modules/zod/v4/classic/schemas.d.ts +0 -630
  1881. package/node_modules/zod/v4/classic/schemas.js +0 -1006
  1882. package/node_modules/zod/v4/core/api.cjs +0 -1039
  1883. package/node_modules/zod/v4/core/api.d.cts +0 -284
  1884. package/node_modules/zod/v4/core/api.d.ts +0 -284
  1885. package/node_modules/zod/v4/core/api.js +0 -906
  1886. package/node_modules/zod/v4/core/checks.cjs +0 -591
  1887. package/node_modules/zod/v4/core/checks.d.cts +0 -278
  1888. package/node_modules/zod/v4/core/checks.d.ts +0 -278
  1889. package/node_modules/zod/v4/core/checks.js +0 -565
  1890. package/node_modules/zod/v4/core/core.cjs +0 -67
  1891. package/node_modules/zod/v4/core/core.d.cts +0 -49
  1892. package/node_modules/zod/v4/core/core.d.ts +0 -49
  1893. package/node_modules/zod/v4/core/core.js +0 -61
  1894. package/node_modules/zod/v4/core/doc.cjs +0 -39
  1895. package/node_modules/zod/v4/core/doc.d.cts +0 -14
  1896. package/node_modules/zod/v4/core/doc.d.ts +0 -14
  1897. package/node_modules/zod/v4/core/doc.js +0 -35
  1898. package/node_modules/zod/v4/core/errors.cjs +0 -226
  1899. package/node_modules/zod/v4/core/errors.d.cts +0 -208
  1900. package/node_modules/zod/v4/core/errors.d.ts +0 -208
  1901. package/node_modules/zod/v4/core/errors.js +0 -195
  1902. package/node_modules/zod/v4/core/function.cjs +0 -102
  1903. package/node_modules/zod/v4/core/function.d.cts +0 -52
  1904. package/node_modules/zod/v4/core/function.d.ts +0 -52
  1905. package/node_modules/zod/v4/core/function.js +0 -75
  1906. package/node_modules/zod/v4/core/index.cjs +0 -44
  1907. package/node_modules/zod/v4/core/index.d.cts +0 -15
  1908. package/node_modules/zod/v4/core/index.d.ts +0 -15
  1909. package/node_modules/zod/v4/core/index.js +0 -15
  1910. package/node_modules/zod/v4/core/json-schema.cjs +0 -2
  1911. package/node_modules/zod/v4/core/json-schema.d.cts +0 -87
  1912. package/node_modules/zod/v4/core/json-schema.d.ts +0 -87
  1913. package/node_modules/zod/v4/core/json-schema.js +0 -1
  1914. package/node_modules/zod/v4/core/parse.cjs +0 -87
  1915. package/node_modules/zod/v4/core/parse.d.cts +0 -25
  1916. package/node_modules/zod/v4/core/parse.d.ts +0 -25
  1917. package/node_modules/zod/v4/core/parse.js +0 -57
  1918. package/node_modules/zod/v4/core/regexes.cjs +0 -103
  1919. package/node_modules/zod/v4/core/regexes.d.cts +0 -62
  1920. package/node_modules/zod/v4/core/regexes.d.ts +0 -62
  1921. package/node_modules/zod/v4/core/regexes.js +0 -95
  1922. package/node_modules/zod/v4/core/registries.cjs +0 -56
  1923. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  1924. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  1925. package/node_modules/zod/v4/core/registries.js +0 -51
  1926. package/node_modules/zod/v4/core/schemas.cjs +0 -1748
  1927. package/node_modules/zod/v4/core/schemas.d.cts +0 -1041
  1928. package/node_modules/zod/v4/core/schemas.d.ts +0 -1041
  1929. package/node_modules/zod/v4/core/schemas.js +0 -1717
  1930. package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  1931. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
  1932. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
  1933. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  1934. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -854
  1935. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -88
  1936. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -88
  1937. package/node_modules/zod/v4/core/to-json-schema.js +0 -849
  1938. package/node_modules/zod/v4/core/util.cjs +0 -539
  1939. package/node_modules/zod/v4/core/util.d.cts +0 -183
  1940. package/node_modules/zod/v4/core/util.d.ts +0 -183
  1941. package/node_modules/zod/v4/core/util.js +0 -493
  1942. package/node_modules/zod/v4/core/versions.cjs +0 -8
  1943. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  1944. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  1945. package/node_modules/zod/v4/core/versions.js +0 -5
  1946. package/node_modules/zod/v4/index.cjs +0 -22
  1947. package/node_modules/zod/v4/index.d.cts +0 -3
  1948. package/node_modules/zod/v4/index.d.ts +0 -3
  1949. package/node_modules/zod/v4/index.js +0 -3
  1950. package/node_modules/zod/v4/locales/ar.cjs +0 -142
  1951. package/node_modules/zod/v4/locales/ar.d.cts +0 -4
  1952. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  1953. package/node_modules/zod/v4/locales/ar.js +0 -116
  1954. package/node_modules/zod/v4/locales/az.cjs +0 -141
  1955. package/node_modules/zod/v4/locales/az.d.cts +0 -4
  1956. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  1957. package/node_modules/zod/v4/locales/az.js +0 -115
  1958. package/node_modules/zod/v4/locales/be.cjs +0 -190
  1959. package/node_modules/zod/v4/locales/be.d.cts +0 -4
  1960. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  1961. package/node_modules/zod/v4/locales/be.js +0 -164
  1962. package/node_modules/zod/v4/locales/ca.cjs +0 -144
  1963. package/node_modules/zod/v4/locales/ca.d.cts +0 -4
  1964. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  1965. package/node_modules/zod/v4/locales/ca.js +0 -118
  1966. package/node_modules/zod/v4/locales/cs.cjs +0 -161
  1967. package/node_modules/zod/v4/locales/cs.d.cts +0 -4
  1968. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  1969. package/node_modules/zod/v4/locales/cs.js +0 -135
  1970. package/node_modules/zod/v4/locales/de.cjs +0 -142
  1971. package/node_modules/zod/v4/locales/de.d.cts +0 -4
  1972. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  1973. package/node_modules/zod/v4/locales/de.js +0 -116
  1974. package/node_modules/zod/v4/locales/en.cjs +0 -145
  1975. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  1976. package/node_modules/zod/v4/locales/en.d.ts +0 -5
  1977. package/node_modules/zod/v4/locales/en.js +0 -117
  1978. package/node_modules/zod/v4/locales/eo.cjs +0 -144
  1979. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  1980. package/node_modules/zod/v4/locales/eo.d.ts +0 -5
  1981. package/node_modules/zod/v4/locales/eo.js +0 -116
  1982. package/node_modules/zod/v4/locales/es.cjs +0 -143
  1983. package/node_modules/zod/v4/locales/es.d.cts +0 -4
  1984. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  1985. package/node_modules/zod/v4/locales/es.js +0 -117
  1986. package/node_modules/zod/v4/locales/fa.cjs +0 -148
  1987. package/node_modules/zod/v4/locales/fa.d.cts +0 -4
  1988. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  1989. package/node_modules/zod/v4/locales/fa.js +0 -122
  1990. package/node_modules/zod/v4/locales/fi.cjs +0 -148
  1991. package/node_modules/zod/v4/locales/fi.d.cts +0 -4
  1992. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  1993. package/node_modules/zod/v4/locales/fi.js +0 -122
  1994. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -143
  1995. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  1996. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  1997. package/node_modules/zod/v4/locales/fr-CA.js +0 -117
  1998. package/node_modules/zod/v4/locales/fr.cjs +0 -142
  1999. package/node_modules/zod/v4/locales/fr.d.cts +0 -4
  2000. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  2001. package/node_modules/zod/v4/locales/fr.js +0 -116
  2002. package/node_modules/zod/v4/locales/he.cjs +0 -143
  2003. package/node_modules/zod/v4/locales/he.d.cts +0 -4
  2004. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  2005. package/node_modules/zod/v4/locales/he.js +0 -117
  2006. package/node_modules/zod/v4/locales/hu.cjs +0 -143
  2007. package/node_modules/zod/v4/locales/hu.d.cts +0 -4
  2008. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  2009. package/node_modules/zod/v4/locales/hu.js +0 -117
  2010. package/node_modules/zod/v4/locales/id.cjs +0 -142
  2011. package/node_modules/zod/v4/locales/id.d.cts +0 -4
  2012. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  2013. package/node_modules/zod/v4/locales/id.js +0 -116
  2014. package/node_modules/zod/v4/locales/index.cjs +0 -84
  2015. package/node_modules/zod/v4/locales/index.d.cts +0 -39
  2016. package/node_modules/zod/v4/locales/index.d.ts +0 -39
  2017. package/node_modules/zod/v4/locales/index.js +0 -39
  2018. package/node_modules/zod/v4/locales/it.cjs +0 -143
  2019. package/node_modules/zod/v4/locales/it.d.cts +0 -4
  2020. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  2021. package/node_modules/zod/v4/locales/it.js +0 -117
  2022. package/node_modules/zod/v4/locales/ja.cjs +0 -141
  2023. package/node_modules/zod/v4/locales/ja.d.cts +0 -4
  2024. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  2025. package/node_modules/zod/v4/locales/ja.js +0 -115
  2026. package/node_modules/zod/v4/locales/kh.cjs +0 -143
  2027. package/node_modules/zod/v4/locales/kh.d.cts +0 -4
  2028. package/node_modules/zod/v4/locales/kh.d.ts +0 -4
  2029. package/node_modules/zod/v4/locales/kh.js +0 -117
  2030. package/node_modules/zod/v4/locales/ko.cjs +0 -147
  2031. package/node_modules/zod/v4/locales/ko.d.cts +0 -4
  2032. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  2033. package/node_modules/zod/v4/locales/ko.js +0 -121
  2034. package/node_modules/zod/v4/locales/mk.cjs +0 -144
  2035. package/node_modules/zod/v4/locales/mk.d.cts +0 -4
  2036. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  2037. package/node_modules/zod/v4/locales/mk.js +0 -118
  2038. package/node_modules/zod/v4/locales/ms.cjs +0 -142
  2039. package/node_modules/zod/v4/locales/ms.d.cts +0 -4
  2040. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  2041. package/node_modules/zod/v4/locales/ms.js +0 -116
  2042. package/node_modules/zod/v4/locales/nl.cjs +0 -143
  2043. package/node_modules/zod/v4/locales/nl.d.cts +0 -4
  2044. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  2045. package/node_modules/zod/v4/locales/nl.js +0 -117
  2046. package/node_modules/zod/v4/locales/no.cjs +0 -142
  2047. package/node_modules/zod/v4/locales/no.d.cts +0 -4
  2048. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  2049. package/node_modules/zod/v4/locales/no.js +0 -116
  2050. package/node_modules/zod/v4/locales/ota.cjs +0 -143
  2051. package/node_modules/zod/v4/locales/ota.d.cts +0 -4
  2052. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  2053. package/node_modules/zod/v4/locales/ota.js +0 -117
  2054. package/node_modules/zod/v4/locales/pl.cjs +0 -143
  2055. package/node_modules/zod/v4/locales/pl.d.cts +0 -4
  2056. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  2057. package/node_modules/zod/v4/locales/pl.js +0 -117
  2058. package/node_modules/zod/v4/locales/ps.cjs +0 -148
  2059. package/node_modules/zod/v4/locales/ps.d.cts +0 -4
  2060. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  2061. package/node_modules/zod/v4/locales/ps.js +0 -122
  2062. package/node_modules/zod/v4/locales/pt.cjs +0 -142
  2063. package/node_modules/zod/v4/locales/pt.d.cts +0 -4
  2064. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  2065. package/node_modules/zod/v4/locales/pt.js +0 -116
  2066. package/node_modules/zod/v4/locales/ru.cjs +0 -190
  2067. package/node_modules/zod/v4/locales/ru.d.cts +0 -4
  2068. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  2069. package/node_modules/zod/v4/locales/ru.js +0 -164
  2070. package/node_modules/zod/v4/locales/sl.cjs +0 -143
  2071. package/node_modules/zod/v4/locales/sl.d.cts +0 -4
  2072. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  2073. package/node_modules/zod/v4/locales/sl.js +0 -117
  2074. package/node_modules/zod/v4/locales/sv.cjs +0 -144
  2075. package/node_modules/zod/v4/locales/sv.d.cts +0 -4
  2076. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  2077. package/node_modules/zod/v4/locales/sv.js +0 -118
  2078. package/node_modules/zod/v4/locales/ta.cjs +0 -143
  2079. package/node_modules/zod/v4/locales/ta.d.cts +0 -4
  2080. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  2081. package/node_modules/zod/v4/locales/ta.js +0 -117
  2082. package/node_modules/zod/v4/locales/th.cjs +0 -143
  2083. package/node_modules/zod/v4/locales/th.d.cts +0 -4
  2084. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  2085. package/node_modules/zod/v4/locales/th.js +0 -117
  2086. package/node_modules/zod/v4/locales/tr.cjs +0 -143
  2087. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  2088. package/node_modules/zod/v4/locales/tr.d.ts +0 -5
  2089. package/node_modules/zod/v4/locales/tr.js +0 -115
  2090. package/node_modules/zod/v4/locales/ua.cjs +0 -143
  2091. package/node_modules/zod/v4/locales/ua.d.cts +0 -4
  2092. package/node_modules/zod/v4/locales/ua.d.ts +0 -4
  2093. package/node_modules/zod/v4/locales/ua.js +0 -117
  2094. package/node_modules/zod/v4/locales/ur.cjs +0 -143
  2095. package/node_modules/zod/v4/locales/ur.d.cts +0 -4
  2096. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  2097. package/node_modules/zod/v4/locales/ur.js +0 -117
  2098. package/node_modules/zod/v4/locales/vi.cjs +0 -142
  2099. package/node_modules/zod/v4/locales/vi.d.cts +0 -4
  2100. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  2101. package/node_modules/zod/v4/locales/vi.js +0 -116
  2102. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -142
  2103. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  2104. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  2105. package/node_modules/zod/v4/locales/zh-CN.js +0 -116
  2106. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -143
  2107. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  2108. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  2109. package/node_modules/zod/v4/locales/zh-TW.js +0 -117
  2110. package/node_modules/zod/v4/mini/checks.cjs +0 -34
  2111. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  2112. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  2113. package/node_modules/zod/v4/mini/checks.js +0 -1
  2114. package/node_modules/zod/v4/mini/coerce.cjs +0 -47
  2115. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  2116. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  2117. package/node_modules/zod/v4/mini/coerce.js +0 -17
  2118. package/node_modules/zod/v4/mini/external.cjs +0 -62
  2119. package/node_modules/zod/v4/mini/external.d.cts +0 -11
  2120. package/node_modules/zod/v4/mini/external.d.ts +0 -11
  2121. package/node_modules/zod/v4/mini/external.js +0 -13
  2122. package/node_modules/zod/v4/mini/index.cjs +0 -32
  2123. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  2124. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  2125. package/node_modules/zod/v4/mini/index.js +0 -3
  2126. package/node_modules/zod/v4/mini/iso.cjs +0 -60
  2127. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  2128. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  2129. package/node_modules/zod/v4/mini/iso.js +0 -30
  2130. package/node_modules/zod/v4/mini/parse.cjs +0 -8
  2131. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  2132. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  2133. package/node_modules/zod/v4/mini/parse.js +0 -1
  2134. package/node_modules/zod/v4/mini/schemas.cjs +0 -839
  2135. package/node_modules/zod/v4/mini/schemas.d.cts +0 -356
  2136. package/node_modules/zod/v4/mini/schemas.d.ts +0 -356
  2137. package/node_modules/zod/v4/mini/schemas.js +0 -732
  2138. package/node_modules/zod/v4-mini/index.cjs +0 -17
  2139. package/node_modules/zod/v4-mini/index.d.cts +0 -1
  2140. package/node_modules/zod/v4-mini/index.d.ts +0 -1
  2141. package/node_modules/zod/v4-mini/index.js +0 -1
@@ -1,3243 +0,0 @@
1
- /**
2
- * The `crypto` module provides cryptographic functionality that includes a set of
3
- * wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.
4
- *
5
- * ```js
6
- * const { createHmac } = await import('crypto');
7
- *
8
- * const secret = 'abcdefg';
9
- * const hash = createHmac('sha256', secret)
10
- * .update('I love cupcakes')
11
- * .digest('hex');
12
- * console.log(hash);
13
- * // Prints:
14
- * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
15
- * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/crypto.js)
17
- */
18
- declare module 'crypto' {
19
- import * as stream from 'node:stream';
20
- import { PeerCertificate } from 'node:tls';
21
- interface Certificate {
22
- /**
23
- * @deprecated
24
- * @param spkac
25
- * @returns The challenge component of the `spkac` data structure,
26
- * which includes a public key and a challenge.
27
- */
28
- exportChallenge(spkac: BinaryLike): Buffer;
29
- /**
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.
35
- */
36
- exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
37
- /**
38
- * @deprecated
39
- * @param spkac
40
- * @returns `true` if the given `spkac` data structure is valid,
41
- * `false` otherwise.
42
- */
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;
50
- /**
51
- * @param spkac
52
- * @returns The challenge component of the `spkac` data structure,
53
- * which includes a public key and a challenge.
54
- */
55
- exportChallenge(spkac: BinaryLike): Buffer;
56
- /**
57
- * @param spkac
58
- * @param encoding The encoding of the spkac string.
59
- * @returns The public key component of the `spkac` data structure,
60
- * which includes a public key and a challenge.
61
- */
62
- exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
63
- /**
64
- * @param spkac
65
- * @returns `true` if the given `spkac` data structure is valid,
66
- * `false` otherwise.
67
- */
68
- verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
69
- };
70
- namespace constants {
71
- // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
72
- const OPENSSL_VERSION_NUMBER: number;
73
- /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
74
- const SSL_OP_ALL: number;
75
- /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
76
- const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
77
- /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
78
- const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
79
- /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
80
- const SSL_OP_CISCO_ANYCONNECT: number;
81
- /** Instructs OpenSSL to turn on cookie exchange. */
82
- const SSL_OP_COOKIE_EXCHANGE: number;
83
- /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
84
- const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
85
- /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
86
- const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
87
- /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
88
- const SSL_OP_EPHEMERAL_RSA: number;
89
- /** Allows initial connection to servers that do not support RI. */
90
- const SSL_OP_LEGACY_SERVER_CONNECT: number;
91
- const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
92
- const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
93
- /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
94
- const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
95
- const SSL_OP_NETSCAPE_CA_DN_BUG: number;
96
- const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
97
- const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
98
- const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
99
- /** Instructs OpenSSL to disable support for SSL/TLS compression. */
100
- const SSL_OP_NO_COMPRESSION: number;
101
- const SSL_OP_NO_QUERY_MTU: number;
102
- /** Instructs OpenSSL to always start a new session when performing renegotiation. */
103
- const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
104
- const SSL_OP_NO_SSLv2: number;
105
- const SSL_OP_NO_SSLv3: number;
106
- const SSL_OP_NO_TICKET: number;
107
- const SSL_OP_NO_TLSv1: number;
108
- const SSL_OP_NO_TLSv1_1: number;
109
- const SSL_OP_NO_TLSv1_2: number;
110
- const SSL_OP_PKCS1_CHECK_1: number;
111
- const SSL_OP_PKCS1_CHECK_2: number;
112
- /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
113
- const SSL_OP_SINGLE_DH_USE: number;
114
- /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
115
- const SSL_OP_SINGLE_ECDH_USE: number;
116
- const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
117
- const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
118
- const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
119
- const SSL_OP_TLS_D5_BUG: number;
120
- /** Instructs OpenSSL to disable version rollback attack detection. */
121
- const SSL_OP_TLS_ROLLBACK_BUG: number;
122
- const ENGINE_METHOD_RSA: number;
123
- const ENGINE_METHOD_DSA: number;
124
- const ENGINE_METHOD_DH: number;
125
- const ENGINE_METHOD_RAND: number;
126
- const ENGINE_METHOD_EC: number;
127
- const ENGINE_METHOD_CIPHERS: number;
128
- const ENGINE_METHOD_DIGESTS: number;
129
- const ENGINE_METHOD_PKEY_METHS: number;
130
- const ENGINE_METHOD_PKEY_ASN1_METHS: number;
131
- const ENGINE_METHOD_ALL: number;
132
- const ENGINE_METHOD_NONE: number;
133
- const DH_CHECK_P_NOT_SAFE_PRIME: number;
134
- const DH_CHECK_P_NOT_PRIME: number;
135
- const DH_UNABLE_TO_CHECK_GENERATOR: number;
136
- const DH_NOT_SUITABLE_GENERATOR: number;
137
- const ALPN_ENABLED: number;
138
- const RSA_PKCS1_PADDING: number;
139
- const RSA_SSLV23_PADDING: number;
140
- const RSA_NO_PADDING: number;
141
- const RSA_PKCS1_OAEP_PADDING: number;
142
- const RSA_X931_PADDING: number;
143
- const RSA_PKCS1_PSS_PADDING: number;
144
- /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
145
- const RSA_PSS_SALTLEN_DIGEST: number;
146
- /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
147
- const RSA_PSS_SALTLEN_MAX_SIGN: number;
148
- /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
149
- const RSA_PSS_SALTLEN_AUTO: number;
150
- const POINT_CONVERSION_COMPRESSED: number;
151
- const POINT_CONVERSION_UNCOMPRESSED: number;
152
- const POINT_CONVERSION_HYBRID: number;
153
- /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
154
- const defaultCoreCipherList: string;
155
- /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
156
- const defaultCipherList: string;
157
- }
158
- interface HashOptions extends stream.TransformOptions {
159
- /**
160
- * For XOF hash functions such as `shake256`, the
161
- * outputLength option can be used to specify the desired output length in bytes.
162
- */
163
- outputLength?: number | undefined;
164
- }
165
- /** @deprecated since v10.0.0 */
166
- const fips: boolean;
167
- /**
168
- * Creates and returns a `Hash` object that can be used to generate hash digests
169
- * using the given `algorithm`. Optional `options` argument controls stream
170
- * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
171
- * can be used to specify the desired output length in bytes.
172
- *
173
- * The `algorithm` is dependent on the available algorithms supported by the
174
- * 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
176
- * display the available digest algorithms.
177
- *
178
- * Example: generating the sha256 sum of a file
179
- *
180
- * ```js
181
- * import {
182
- * createReadStream
183
- * } from 'fs';
184
- * import { argv } from 'process';
185
- * const {
186
- * createHash
187
- * } = await import('crypto');
188
- *
189
- * const filename = argv[2];
190
- *
191
- * const hash = createHash('sha256');
192
- *
193
- * const input = createReadStream(filename);
194
- * input.on('readable', () => {
195
- * // Only one element is going to be produced by the
196
- * // hash stream.
197
- * const data = input.read();
198
- * if (data)
199
- * hash.update(data);
200
- * else {
201
- * console.log(`${hash.digest('hex')} ${filename}`);
202
- * }
203
- * });
204
- * ```
205
- * @since v0.1.92
206
- * @param options `stream.transform` options
207
- */
208
- function createHash(algorithm: string, options?: HashOptions): Hash;
209
- /**
210
- * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
211
- * Optional `options` argument controls stream behavior.
212
- *
213
- * The `algorithm` is dependent on the available algorithms supported by the
214
- * 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
216
- * display the available digest algorithms.
217
- *
218
- * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
219
- * a `KeyObject`, its type must be `secret`.
220
- *
221
- * Example: generating the sha256 HMAC of a file
222
- *
223
- * ```js
224
- * import {
225
- * createReadStream
226
- * } from 'fs';
227
- * import { argv } from 'process';
228
- * const {
229
- * createHmac
230
- * } = await import('crypto');
231
- *
232
- * const filename = argv[2];
233
- *
234
- * const hmac = createHmac('sha256', 'a secret');
235
- *
236
- * const input = createReadStream(filename);
237
- * input.on('readable', () => {
238
- * // Only one element is going to be produced by the
239
- * // hash stream.
240
- * const data = input.read();
241
- * if (data)
242
- * hmac.update(data);
243
- * else {
244
- * console.log(`${hmac.digest('hex')} ${filename}`);
245
- * }
246
- * });
247
- * ```
248
- * @since v0.1.94
249
- * @param options `stream.transform` options
250
- */
251
- function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
252
- // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
253
- type BinaryToTextEncoding = 'base64' | 'hex';
254
- type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
255
- type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
256
- type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
257
- type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
258
- /**
259
- * The `Hash` class is a utility for creating hash digests of data. It can be
260
- * used in one of two ways:
261
- *
262
- * * As a `stream` that is both readable and writable, where data is written
263
- * to produce a computed hash digest on the readable side, or
264
- * * Using the `hash.update()` and `hash.digest()` methods to produce the
265
- * computed hash.
266
- *
267
- * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
268
- *
269
- * Example: Using `Hash` objects as streams:
270
- *
271
- * ```js
272
- * const {
273
- * createHash
274
- * } = await import('crypto');
275
- *
276
- * const hash = createHash('sha256');
277
- *
278
- * hash.on('readable', () => {
279
- * // Only one element is going to be produced by the
280
- * // hash stream.
281
- * const data = hash.read();
282
- * if (data) {
283
- * console.log(data.toString('hex'));
284
- * // Prints:
285
- * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
286
- * }
287
- * });
288
- *
289
- * hash.write('some data to hash');
290
- * hash.end();
291
- * ```
292
- *
293
- * Example: Using `Hash` and piped streams:
294
- *
295
- * ```js
296
- * import { createReadStream } from 'fs';
297
- * import { stdout } from 'process';
298
- * const { createHash } = await import('crypto');
299
- *
300
- * const hash = createHash('sha256');
301
- *
302
- * const input = createReadStream('test.js');
303
- * input.pipe(hash).setEncoding('hex').pipe(stdout);
304
- * ```
305
- *
306
- * Example: Using the `hash.update()` and `hash.digest()` methods:
307
- *
308
- * ```js
309
- * const {
310
- * createHash
311
- * } = await import('crypto');
312
- *
313
- * const hash = createHash('sha256');
314
- *
315
- * hash.update('some data to hash');
316
- * console.log(hash.digest('hex'));
317
- * // Prints:
318
- * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
319
- * ```
320
- * @since v0.1.92
321
- */
322
- class Hash extends stream.Transform {
323
- private constructor();
324
- /**
325
- * Creates a new `Hash` object that contains a deep copy of the internal state
326
- * of the current `Hash` object.
327
- *
328
- * The optional `options` argument controls stream behavior. For XOF hash
329
- * functions such as `'shake256'`, the `outputLength` option can be used to
330
- * specify the desired output length in bytes.
331
- *
332
- * An error is thrown when an attempt is made to copy the `Hash` object after
333
- * its `hash.digest()` method has been called.
334
- *
335
- * ```js
336
- * // Calculate a rolling hash.
337
- * const {
338
- * createHash
339
- * } = await import('crypto');
340
- *
341
- * const hash = createHash('sha256');
342
- *
343
- * hash.update('one');
344
- * console.log(hash.copy().digest('hex'));
345
- *
346
- * hash.update('two');
347
- * console.log(hash.copy().digest('hex'));
348
- *
349
- * hash.update('three');
350
- * console.log(hash.copy().digest('hex'));
351
- *
352
- * // Etc.
353
- * ```
354
- * @since v13.1.0
355
- * @param options `stream.transform` options
356
- */
357
- copy(options?: stream.TransformOptions): Hash;
358
- /**
359
- * Updates the hash content with the given `data`, the encoding of which
360
- * is given in `inputEncoding`.
361
- * If `encoding` is not provided, and the `data` is a string, an
362
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
363
- *
364
- * This can be called many times with new data as it is streamed.
365
- * @since v0.1.92
366
- * @param inputEncoding The `encoding` of the `data` string.
367
- */
368
- update(data: BinaryLike): Hash;
369
- update(data: string, inputEncoding: Encoding): Hash;
370
- /**
371
- * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
372
- * If `encoding` is provided a string will be returned; otherwise
373
- * a `Buffer` is returned.
374
- *
375
- * The `Hash` object can not be used again after `hash.digest()` method has been
376
- * called. Multiple calls will cause an error to be thrown.
377
- * @since v0.1.92
378
- * @param encoding The `encoding` of the return value.
379
- */
380
- digest(): Buffer;
381
- digest(encoding: BinaryToTextEncoding): string;
382
- }
383
- /**
384
- * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
385
- * be used in one of two ways:
386
- *
387
- * * As a `stream` that is both readable and writable, where data is written
388
- * to produce a computed HMAC digest on the readable side, or
389
- * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
390
- * computed HMAC digest.
391
- *
392
- * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
393
- *
394
- * Example: Using `Hmac` objects as streams:
395
- *
396
- * ```js
397
- * const {
398
- * createHmac
399
- * } = await import('crypto');
400
- *
401
- * const hmac = createHmac('sha256', 'a secret');
402
- *
403
- * hmac.on('readable', () => {
404
- * // Only one element is going to be produced by the
405
- * // hash stream.
406
- * const data = hmac.read();
407
- * if (data) {
408
- * console.log(data.toString('hex'));
409
- * // Prints:
410
- * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
411
- * }
412
- * });
413
- *
414
- * hmac.write('some data to hash');
415
- * hmac.end();
416
- * ```
417
- *
418
- * Example: Using `Hmac` and piped streams:
419
- *
420
- * ```js
421
- * import { createReadStream } from 'fs';
422
- * import { stdout } from 'process';
423
- * const {
424
- * createHmac
425
- * } = await import('crypto');
426
- *
427
- * const hmac = createHmac('sha256', 'a secret');
428
- *
429
- * const input = createReadStream('test.js');
430
- * input.pipe(hmac).pipe(stdout);
431
- * ```
432
- *
433
- * Example: Using the `hmac.update()` and `hmac.digest()` methods:
434
- *
435
- * ```js
436
- * const {
437
- * createHmac
438
- * } = await import('crypto');
439
- *
440
- * const hmac = createHmac('sha256', 'a secret');
441
- *
442
- * hmac.update('some data to hash');
443
- * console.log(hmac.digest('hex'));
444
- * // Prints:
445
- * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
446
- * ```
447
- * @since v0.1.94
448
- */
449
- class Hmac extends stream.Transform {
450
- private constructor();
451
- /**
452
- * Updates the `Hmac` content with the given `data`, the encoding of which
453
- * is given in `inputEncoding`.
454
- * If `encoding` is not provided, and the `data` is a string, an
455
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
456
- *
457
- * This can be called many times with new data as it is streamed.
458
- * @since v0.1.94
459
- * @param inputEncoding The `encoding` of the `data` string.
460
- */
461
- update(data: BinaryLike): Hmac;
462
- update(data: string, inputEncoding: Encoding): Hmac;
463
- /**
464
- * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
465
- * If `encoding` is
466
- * provided a string is returned; otherwise a `Buffer` is returned;
467
- *
468
- * The `Hmac` object can not be used again after `hmac.digest()` has been
469
- * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
470
- * @since v0.1.94
471
- * @param encoding The `encoding` of the return value.
472
- */
473
- digest(): Buffer;
474
- digest(encoding: BinaryToTextEncoding): string;
475
- }
476
- type KeyObjectType = 'secret' | 'public' | 'private';
477
- interface KeyExportOptions<T extends KeyFormat> {
478
- type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
479
- format: T;
480
- cipher?: string | undefined;
481
- passphrase?: string | Buffer | undefined;
482
- }
483
- interface JwkKeyExportOptions {
484
- format: 'jwk';
485
- }
486
- interface JsonWebKey {
487
- crv?: string | undefined;
488
- d?: string | undefined;
489
- dp?: string | undefined;
490
- dq?: string | undefined;
491
- e?: string | undefined;
492
- k?: string | undefined;
493
- kty?: string | undefined;
494
- n?: string | undefined;
495
- p?: string | undefined;
496
- q?: string | undefined;
497
- qi?: string | undefined;
498
- x?: string | undefined;
499
- y?: string | undefined;
500
- [key: string]: unknown;
501
- }
502
- interface AsymmetricKeyDetails {
503
- /**
504
- * Key size in bits (RSA, DSA).
505
- */
506
- modulusLength?: number | undefined;
507
- /**
508
- * Public exponent (RSA).
509
- */
510
- publicExponent?: bigint | undefined;
511
- /**
512
- * Name of the message digest (RSA-PSS).
513
- */
514
- hashAlgorithm?: string | undefined;
515
- /**
516
- * Name of the message digest used by MGF1 (RSA-PSS).
517
- */
518
- mgf1HashAlgorithm?: string | undefined;
519
- /**
520
- * Minimal salt length in bytes (RSA-PSS).
521
- */
522
- saltLength?: number | undefined;
523
- /**
524
- * Size of q in bits (DSA).
525
- */
526
- divisorLength?: number | undefined;
527
- /**
528
- * Name of the curve (EC).
529
- */
530
- namedCurve?: string | undefined;
531
- }
532
- interface JwkKeyExportOptions {
533
- format: 'jwk';
534
- }
535
- /**
536
- * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
537
- * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
538
- * objects are not to be created directly using the `new`keyword.
539
- *
540
- * Most applications should consider using the new `KeyObject` API instead of
541
- * passing keys as strings or `Buffer`s due to improved security features.
542
- *
543
- * `KeyObject` instances can be passed to other threads via `postMessage()`.
544
- * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
545
- * be listed in the `transferList` argument.
546
- * @since v11.6.0
547
- */
548
- class KeyObject {
549
- private constructor();
550
- /**
551
- * @since v15.0.0
552
- */
553
- static from(key: webcrypto.CryptoKey): KeyObject;
554
- /**
555
- * For asymmetric keys, this property represents the type of the key. Supported key
556
- * types are:
557
- *
558
- * * `'rsa'` (OID 1.2.840.113549.1.1.1)
559
- * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10)
560
- * * `'dsa'` (OID 1.2.840.10040.4.1)
561
- * * `'ec'` (OID 1.2.840.10045.2.1)
562
- * * `'x25519'` (OID 1.3.101.110)
563
- * * `'x448'` (OID 1.3.101.111)
564
- * * `'ed25519'` (OID 1.3.101.112)
565
- * * `'ed448'` (OID 1.3.101.113)
566
- * * `'dh'` (OID 1.2.840.113549.1.3.1)
567
- *
568
- * This property is `undefined` for unrecognized `KeyObject` types and symmetric
569
- * keys.
570
- * @since v11.6.0
571
- */
572
- asymmetricKeyType?: KeyType | undefined;
573
- /**
574
- * For asymmetric keys, this property represents the size of the embedded key in
575
- * bytes. This property is `undefined` for symmetric keys.
576
- */
577
- asymmetricKeySize?: number | undefined;
578
- /**
579
- * This property exists only on asymmetric keys. Depending on the type of the key,
580
- * this object contains information about the key. None of the information obtained
581
- * through this property can be used to uniquely identify a key or to compromise
582
- * the security of the key.
583
- *
584
- * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
585
- * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
586
- * set.
587
- *
588
- * Other key details might be exposed via this API using additional attributes.
589
- * @since v15.7.0
590
- */
591
- asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
592
- /**
593
- * For symmetric keys, the following encoding options can be used:
594
- *
595
- * For public keys, the following encoding options can be used:
596
- *
597
- * For private keys, the following encoding options can be used:
598
- *
599
- * The result type depends on the selected encoding format, when PEM the
600
- * result is a string, when DER it will be a buffer containing the data
601
- * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
602
- *
603
- * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
604
- * ignored.
605
- *
606
- * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
607
- * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
608
- * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
609
- * encrypted private keys. Since PKCS#8 defines its own
610
- * encryption mechanism, PEM-level encryption is not supported when encrypting
611
- * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
612
- * PKCS#1 and SEC1 encryption.
613
- * @since v11.6.0
614
- */
615
- export(options: KeyExportOptions<'pem'>): string | Buffer;
616
- export(options?: KeyExportOptions<'der'>): Buffer;
617
- export(options?: JwkKeyExportOptions): JsonWebKey;
618
- /**
619
- * For secret keys, this property represents the size of the key in bytes. This
620
- * property is `undefined` for asymmetric keys.
621
- * @since v11.6.0
622
- */
623
- symmetricKeySize?: number | undefined;
624
- /**
625
- * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
626
- * or `'private'` for private (asymmetric) keys.
627
- * @since v11.6.0
628
- */
629
- type: KeyObjectType;
630
- }
631
- type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
632
- type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
633
- type BinaryLike = string | NodeJS.ArrayBufferView;
634
- type CipherKey = BinaryLike | KeyObject;
635
- interface CipherCCMOptions extends stream.TransformOptions {
636
- authTagLength: number;
637
- }
638
- interface CipherGCMOptions extends stream.TransformOptions {
639
- authTagLength?: number | undefined;
640
- }
641
- /**
642
- * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
643
- *
644
- * The `options` argument controls stream behavior and is optional except when a
645
- * 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
646
- * 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
647
- * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
648
- *
649
- * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
650
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
651
- * display the available cipher algorithms.
652
- *
653
- * The `password` is used to derive the cipher key and initialization vector (IV).
654
- * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`.
655
- *
656
- * The implementation of `crypto.createCipher()` derives keys using the OpenSSL
657
- * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
658
- * iteration, and no salt. The lack of salt allows dictionary attacks as the same
659
- * password always creates the same key. The low iteration count and
660
- * non-cryptographically secure hash algorithm allow passwords to be tested very
661
- * rapidly.
662
- *
663
- * In line with OpenSSL's recommendation to use a more modern algorithm instead of[`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
664
- * developers derive a key and IV on
665
- * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
666
- * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
667
- * they are used in order to avoid the risk of IV reuse that causes
668
- * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details.
669
- * @since v0.1.94
670
- * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead.
671
- * @param options `stream.transform` options
672
- */
673
- function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
674
- /** @deprecated since v10.0.0 use `createCipheriv()` */
675
- function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
676
- /** @deprecated since v10.0.0 use `createCipheriv()` */
677
- function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
678
- /**
679
- * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
680
- * initialization vector (`iv`).
681
- *
682
- * The `options` argument controls stream behavior and is optional except when a
683
- * 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
684
- * 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
685
- * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
686
- *
687
- * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
688
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
689
- * display the available cipher algorithms.
690
- *
691
- * 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
692
- * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
693
- * a `KeyObject` of type `secret`. If the cipher does not need
694
- * an initialization vector, `iv` may be `null`.
695
- *
696
- * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
697
- *
698
- * Initialization vectors should be unpredictable and unique; ideally, they will be
699
- * cryptographically random. They do not have to be secret: IVs are typically just
700
- * added to ciphertext messages unencrypted. It may sound contradictory that
701
- * something has to be unpredictable and unique, but does not have to be secret;
702
- * remember that an attacker must not be able to predict ahead of time what a
703
- * given IV will be.
704
- * @since v0.1.94
705
- * @param options `stream.transform` options
706
- */
707
- function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): CipherCCM;
708
- function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): CipherGCM;
709
- function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
710
- /**
711
- * Instances of the `Cipher` class are used to encrypt data. The class can be
712
- * used in one of two ways:
713
- *
714
- * * As a `stream` that is both readable and writable, where plain unencrypted
715
- * data is written to produce encrypted data on the readable side, or
716
- * * Using the `cipher.update()` and `cipher.final()` methods to produce
717
- * the encrypted data.
718
- *
719
- * The {@link createCipher} or {@link createCipheriv} methods are
720
- * used to create `Cipher` instances. `Cipher` objects are not to be created
721
- * directly using the `new` keyword.
722
- *
723
- * Example: Using `Cipher` objects as streams:
724
- *
725
- * ```js
726
- * const {
727
- * scrypt,
728
- * randomFill,
729
- * createCipheriv
730
- * } = await import('crypto');
731
- *
732
- * const algorithm = 'aes-192-cbc';
733
- * const password = 'Password used to generate key';
734
- *
735
- * // First, we'll generate the key. The key length is dependent on the algorithm.
736
- * // In this case for aes192, it is 24 bytes (192 bits).
737
- * scrypt(password, 'salt', 24, (err, key) => {
738
- * if (err) throw err;
739
- * // Then, we'll generate a random initialization vector
740
- * randomFill(new Uint8Array(16), (err, iv) => {
741
- * if (err) throw err;
742
- *
743
- * // Once we have the key and iv, we can create and use the cipher...
744
- * const cipher = createCipheriv(algorithm, key, iv);
745
- *
746
- * let encrypted = '';
747
- * cipher.setEncoding('hex');
748
- *
749
- * cipher.on('data', (chunk) => encrypted += chunk);
750
- * cipher.on('end', () => console.log(encrypted));
751
- *
752
- * cipher.write('some clear text data');
753
- * cipher.end();
754
- * });
755
- * });
756
- * ```
757
- *
758
- * Example: Using `Cipher` and piped streams:
759
- *
760
- * ```js
761
- * import {
762
- * createReadStream,
763
- * createWriteStream,
764
- * } from 'fs';
765
- *
766
- * import {
767
- * pipeline
768
- * } from 'stream';
769
- *
770
- * const {
771
- * scrypt,
772
- * randomFill,
773
- * createCipheriv
774
- * } = await import('crypto');
775
- *
776
- * const algorithm = 'aes-192-cbc';
777
- * const password = 'Password used to generate key';
778
- *
779
- * // First, we'll generate the key. The key length is dependent on the algorithm.
780
- * // In this case for aes192, it is 24 bytes (192 bits).
781
- * scrypt(password, 'salt', 24, (err, key) => {
782
- * if (err) throw err;
783
- * // Then, we'll generate a random initialization vector
784
- * randomFill(new Uint8Array(16), (err, iv) => {
785
- * if (err) throw err;
786
- *
787
- * const cipher = createCipheriv(algorithm, key, iv);
788
- *
789
- * const input = createReadStream('test.js');
790
- * const output = createWriteStream('test.enc');
791
- *
792
- * pipeline(input, cipher, output, (err) => {
793
- * if (err) throw err;
794
- * });
795
- * });
796
- * });
797
- * ```
798
- *
799
- * Example: Using the `cipher.update()` and `cipher.final()` methods:
800
- *
801
- * ```js
802
- * const {
803
- * scrypt,
804
- * randomFill,
805
- * createCipheriv
806
- * } = await import('crypto');
807
- *
808
- * const algorithm = 'aes-192-cbc';
809
- * const password = 'Password used to generate key';
810
- *
811
- * // First, we'll generate the key. The key length is dependent on the algorithm.
812
- * // In this case for aes192, it is 24 bytes (192 bits).
813
- * scrypt(password, 'salt', 24, (err, key) => {
814
- * if (err) throw err;
815
- * // Then, we'll generate a random initialization vector
816
- * randomFill(new Uint8Array(16), (err, iv) => {
817
- * if (err) throw err;
818
- *
819
- * const cipher = createCipheriv(algorithm, key, iv);
820
- *
821
- * let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
822
- * encrypted += cipher.final('hex');
823
- * console.log(encrypted);
824
- * });
825
- * });
826
- * ```
827
- * @since v0.1.94
828
- */
829
- class Cipher extends stream.Transform {
830
- private constructor();
831
- /**
832
- * Updates the cipher with `data`. If the `inputEncoding` argument is given,
833
- * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
834
- * `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
835
- *
836
- * The `outputEncoding` specifies the output format of the enciphered
837
- * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
838
- *
839
- * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
840
- * thrown.
841
- * @since v0.1.94
842
- * @param inputEncoding The `encoding` of the data.
843
- * @param outputEncoding The `encoding` of the return value.
844
- */
845
- update(data: BinaryLike): Buffer;
846
- update(data: string, inputEncoding: Encoding): Buffer;
847
- update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
848
- update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
849
- /**
850
- * Once the `cipher.final()` method has been called, the `Cipher` object can no
851
- * longer be used to encrypt data. Attempts to call `cipher.final()` more than
852
- * once will result in an error being thrown.
853
- * @since v0.1.94
854
- * @param outputEncoding The `encoding` of the return value.
855
- * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
856
- */
857
- final(): Buffer;
858
- final(outputEncoding: BufferEncoding): string;
859
- /**
860
- * When using block encryption algorithms, the `Cipher` class will automatically
861
- * add padding to the input data to the appropriate block size. To disable the
862
- * default padding call `cipher.setAutoPadding(false)`.
863
- *
864
- * When `autoPadding` is `false`, the length of the entire input data must be a
865
- * multiple of the cipher's block size or `cipher.final()` will throw an error.
866
- * Disabling automatic padding is useful for non-standard padding, for instance
867
- * using `0x0` instead of PKCS padding.
868
- *
869
- * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
870
- * @since v0.7.1
871
- * @param [autoPadding=true]
872
- * @return for method chaining.
873
- */
874
- setAutoPadding(autoPadding?: boolean): this;
875
- }
876
- interface CipherCCM extends Cipher {
877
- setAAD(
878
- buffer: NodeJS.ArrayBufferView,
879
- options: {
880
- plaintextLength: number;
881
- }
882
- ): this;
883
- getAuthTag(): Buffer;
884
- }
885
- interface CipherGCM extends Cipher {
886
- setAAD(
887
- buffer: NodeJS.ArrayBufferView,
888
- options?: {
889
- plaintextLength: number;
890
- }
891
- ): this;
892
- getAuthTag(): Buffer;
893
- }
894
- /**
895
- * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
896
- *
897
- * The `options` argument controls stream behavior and is optional except when a
898
- * 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
899
- * authentication tag in bytes, see `CCM mode`.
900
- *
901
- * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL
902
- * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) with the digest algorithm set to MD5, one
903
- * iteration, and no salt. The lack of salt allows dictionary attacks as the same
904
- * password always creates the same key. The low iteration count and
905
- * non-cryptographically secure hash algorithm allow passwords to be tested very
906
- * rapidly.
907
- *
908
- * In line with OpenSSL's recommendation to use a more modern algorithm instead of[`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
909
- * developers derive a key and IV on
910
- * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
911
- * @since v0.1.94
912
- * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead.
913
- * @param options `stream.transform` options
914
- */
915
- function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
916
- /** @deprecated since v10.0.0 use `createDecipheriv()` */
917
- function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
918
- /** @deprecated since v10.0.0 use `createDecipheriv()` */
919
- function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
920
- /**
921
- * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
922
- *
923
- * The `options` argument controls stream behavior and is optional except when a
924
- * 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
925
- * 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
926
- * to those with the specified length.
927
- *
928
- * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
929
- * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
930
- * display the available cipher algorithms.
931
- *
932
- * 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
933
- * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
934
- * a `KeyObject` of type `secret`. If the cipher does not need
935
- * an initialization vector, `iv` may be `null`.
936
- *
937
- * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
938
- *
939
- * Initialization vectors should be unpredictable and unique; ideally, they will be
940
- * cryptographically random. They do not have to be secret: IVs are typically just
941
- * added to ciphertext messages unencrypted. It may sound contradictory that
942
- * something has to be unpredictable and unique, but does not have to be secret;
943
- * remember that an attacker must not be able to predict ahead of time what a given
944
- * IV will be.
945
- * @since v0.1.94
946
- * @param options `stream.transform` options
947
- */
948
- function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): DecipherCCM;
949
- function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): DecipherGCM;
950
- function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
951
- /**
952
- * Instances of the `Decipher` class are used to decrypt data. The class can be
953
- * used in one of two ways:
954
- *
955
- * * As a `stream` that is both readable and writable, where plain encrypted
956
- * data is written to produce unencrypted data on the readable side, or
957
- * * Using the `decipher.update()` and `decipher.final()` methods to
958
- * produce the unencrypted data.
959
- *
960
- * The {@link createDecipher} or {@link createDecipheriv} methods are
961
- * used to create `Decipher` instances. `Decipher` objects are not to be created
962
- * directly using the `new` keyword.
963
- *
964
- * Example: Using `Decipher` objects as streams:
965
- *
966
- * ```js
967
- * import { Buffer } from 'buffer';
968
- * const {
969
- * scryptSync,
970
- * createDecipheriv
971
- * } = await import('crypto');
972
- *
973
- * const algorithm = 'aes-192-cbc';
974
- * const password = 'Password used to generate key';
975
- * // Key length is dependent on the algorithm. In this case for aes192, it is
976
- * // 24 bytes (192 bits).
977
- * // Use the async `crypto.scrypt()` instead.
978
- * const key = scryptSync(password, 'salt', 24);
979
- * // The IV is usually passed along with the ciphertext.
980
- * const iv = Buffer.alloc(16, 0); // Initialization vector.
981
- *
982
- * const decipher = createDecipheriv(algorithm, key, iv);
983
- *
984
- * let decrypted = '';
985
- * decipher.on('readable', () => {
986
- * while (null !== (chunk = decipher.read())) {
987
- * decrypted += chunk.toString('utf8');
988
- * }
989
- * });
990
- * decipher.on('end', () => {
991
- * console.log(decrypted);
992
- * // Prints: some clear text data
993
- * });
994
- *
995
- * // Encrypted with same algorithm, key and iv.
996
- * const encrypted =
997
- * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
998
- * decipher.write(encrypted, 'hex');
999
- * decipher.end();
1000
- * ```
1001
- *
1002
- * Example: Using `Decipher` and piped streams:
1003
- *
1004
- * ```js
1005
- * import {
1006
- * createReadStream,
1007
- * createWriteStream,
1008
- * } from 'fs';
1009
- * import { Buffer } from 'buffer';
1010
- * const {
1011
- * scryptSync,
1012
- * createDecipheriv
1013
- * } = await import('crypto');
1014
- *
1015
- * const algorithm = 'aes-192-cbc';
1016
- * const password = 'Password used to generate key';
1017
- * // Use the async `crypto.scrypt()` instead.
1018
- * const key = scryptSync(password, 'salt', 24);
1019
- * // The IV is usually passed along with the ciphertext.
1020
- * const iv = Buffer.alloc(16, 0); // Initialization vector.
1021
- *
1022
- * const decipher = createDecipheriv(algorithm, key, iv);
1023
- *
1024
- * const input = createReadStream('test.enc');
1025
- * const output = createWriteStream('test.js');
1026
- *
1027
- * input.pipe(decipher).pipe(output);
1028
- * ```
1029
- *
1030
- * Example: Using the `decipher.update()` and `decipher.final()` methods:
1031
- *
1032
- * ```js
1033
- * import { Buffer } from 'buffer';
1034
- * const {
1035
- * scryptSync,
1036
- * createDecipheriv
1037
- * } = await import('crypto');
1038
- *
1039
- * const algorithm = 'aes-192-cbc';
1040
- * const password = 'Password used to generate key';
1041
- * // Use the async `crypto.scrypt()` instead.
1042
- * const key = scryptSync(password, 'salt', 24);
1043
- * // The IV is usually passed along with the ciphertext.
1044
- * const iv = Buffer.alloc(16, 0); // Initialization vector.
1045
- *
1046
- * const decipher = createDecipheriv(algorithm, key, iv);
1047
- *
1048
- * // Encrypted using same algorithm, key and iv.
1049
- * const encrypted =
1050
- * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
1051
- * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
1052
- * decrypted += decipher.final('utf8');
1053
- * console.log(decrypted);
1054
- * // Prints: some clear text data
1055
- * ```
1056
- * @since v0.1.94
1057
- */
1058
- class Decipher extends stream.Transform {
1059
- private constructor();
1060
- /**
1061
- * Updates the decipher with `data`. If the `inputEncoding` argument is given,
1062
- * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
1063
- * ignored.
1064
- *
1065
- * The `outputEncoding` specifies the output format of the enciphered
1066
- * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
1067
- *
1068
- * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
1069
- * being thrown.
1070
- * @since v0.1.94
1071
- * @param inputEncoding The `encoding` of the `data` string.
1072
- * @param outputEncoding The `encoding` of the return value.
1073
- */
1074
- update(data: NodeJS.ArrayBufferView): Buffer;
1075
- update(data: string, inputEncoding: Encoding): Buffer;
1076
- update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
1077
- update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
1078
- /**
1079
- * Once the `decipher.final()` method has been called, the `Decipher` object can
1080
- * no longer be used to decrypt data. Attempts to call `decipher.final()` more
1081
- * than once will result in an error being thrown.
1082
- * @since v0.1.94
1083
- * @param outputEncoding The `encoding` of the return value.
1084
- * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
1085
- */
1086
- final(): Buffer;
1087
- final(outputEncoding: BufferEncoding): string;
1088
- /**
1089
- * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
1090
- * removing padding.
1091
- *
1092
- * Turning auto padding off will only work if the input data's length is a
1093
- * multiple of the ciphers block size.
1094
- *
1095
- * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
1096
- * @since v0.7.1
1097
- * @param [autoPadding=true]
1098
- * @return for method chaining.
1099
- */
1100
- setAutoPadding(auto_padding?: boolean): this;
1101
- }
1102
- interface DecipherCCM extends Decipher {
1103
- setAuthTag(buffer: NodeJS.ArrayBufferView): this;
1104
- setAAD(
1105
- buffer: NodeJS.ArrayBufferView,
1106
- options: {
1107
- plaintextLength: number;
1108
- }
1109
- ): this;
1110
- }
1111
- interface DecipherGCM extends Decipher {
1112
- setAuthTag(buffer: NodeJS.ArrayBufferView): this;
1113
- setAAD(
1114
- buffer: NodeJS.ArrayBufferView,
1115
- options?: {
1116
- plaintextLength: number;
1117
- }
1118
- ): this;
1119
- }
1120
- interface PrivateKeyInput {
1121
- key: string | Buffer;
1122
- format?: KeyFormat | undefined;
1123
- type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
1124
- passphrase?: string | Buffer | undefined;
1125
- }
1126
- interface PublicKeyInput {
1127
- key: string | Buffer;
1128
- format?: KeyFormat | undefined;
1129
- type?: 'pkcs1' | 'spki' | undefined;
1130
- }
1131
- /**
1132
- * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
1133
- *
1134
- * ```js
1135
- * const {
1136
- * generateKey
1137
- * } = await import('crypto');
1138
- *
1139
- * generateKey('hmac', { length: 64 }, (err, key) => {
1140
- * if (err) throw err;
1141
- * console.log(key.export().toString('hex')); // 46e..........620
1142
- * });
1143
- * ```
1144
- * @since v15.0.0
1145
- * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
1146
- */
1147
- function generateKey(
1148
- type: 'hmac' | 'aes',
1149
- options: {
1150
- length: number;
1151
- },
1152
- callback: (err: Error | null, key: KeyObject) => void
1153
- ): void;
1154
- interface JsonWebKeyInput {
1155
- key: JsonWebKey;
1156
- format: 'jwk';
1157
- }
1158
- /**
1159
- * Creates and returns a new key object containing a private key. If `key` is a
1160
- * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
1161
- *
1162
- * If the private key is encrypted, a `passphrase` must be specified. The length
1163
- * of the passphrase is limited to 1024 bytes.
1164
- * @since v11.6.0
1165
- */
1166
- function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
1167
- /**
1168
- * Creates and returns a new key object containing a public key. If `key` is a
1169
- * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
1170
- * otherwise, `key` must be an object with the properties described above.
1171
- *
1172
- * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
1173
- *
1174
- * Because public keys can be derived from private keys, a private key may be
1175
- * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
1176
- * returned `KeyObject` will be `'public'` and that the private key cannot be
1177
- * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
1178
- * and it will be impossible to extract the private key from the returned object.
1179
- * @since v11.6.0
1180
- */
1181
- function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
1182
- /**
1183
- * Creates and returns a new key object containing a secret key for symmetric
1184
- * encryption or `Hmac`.
1185
- * @since v11.6.0
1186
- * @param encoding The string encoding when `key` is a string.
1187
- */
1188
- function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
1189
- function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
1190
- /**
1191
- * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
1192
- * Optional `options` argument controls the `stream.Writable` behavior.
1193
- *
1194
- * In some cases, a `Sign` instance can be created using the name of a signature
1195
- * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
1196
- * the corresponding digest algorithm. This does not work for all signature
1197
- * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
1198
- * algorithm names.
1199
- * @since v0.1.92
1200
- * @param options `stream.Writable` options
1201
- */
1202
- function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
1203
- type DSAEncoding = 'der' | 'ieee-p1363';
1204
- interface SigningOptions {
1205
- /**
1206
- * @See crypto.constants.RSA_PKCS1_PADDING
1207
- */
1208
- padding?: number | undefined;
1209
- saltLength?: number | undefined;
1210
- dsaEncoding?: DSAEncoding | undefined;
1211
- }
1212
- interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
1213
- interface SignKeyObjectInput extends SigningOptions {
1214
- key: KeyObject;
1215
- }
1216
- interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
1217
- interface VerifyKeyObjectInput extends SigningOptions {
1218
- key: KeyObject;
1219
- }
1220
- type KeyLike = string | Buffer | KeyObject;
1221
- /**
1222
- * The `Sign` class is a utility for generating signatures. It can be used in one
1223
- * of two ways:
1224
- *
1225
- * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
1226
- * * Using the `sign.update()` and `sign.sign()` methods to produce the
1227
- * signature.
1228
- *
1229
- * The {@link createSign} method is used to create `Sign` instances. The
1230
- * argument is the string name of the hash function to use. `Sign` objects are not
1231
- * to be created directly using the `new` keyword.
1232
- *
1233
- * Example: Using `Sign` and `Verify` objects as streams:
1234
- *
1235
- * ```js
1236
- * const {
1237
- * generateKeyPairSync,
1238
- * createSign,
1239
- * createVerify
1240
- * } = await import('crypto');
1241
- *
1242
- * const { privateKey, publicKey } = generateKeyPairSync('ec', {
1243
- * namedCurve: 'sect239k1'
1244
- * });
1245
- *
1246
- * const sign = createSign('SHA256');
1247
- * sign.write('some data to sign');
1248
- * sign.end();
1249
- * const signature = sign.sign(privateKey, 'hex');
1250
- *
1251
- * const verify = createVerify('SHA256');
1252
- * verify.write('some data to sign');
1253
- * verify.end();
1254
- * console.log(verify.verify(publicKey, signature, 'hex'));
1255
- * // Prints: true
1256
- * ```
1257
- *
1258
- * Example: Using the `sign.update()` and `verify.update()` methods:
1259
- *
1260
- * ```js
1261
- * const {
1262
- * generateKeyPairSync,
1263
- * createSign,
1264
- * createVerify
1265
- * } = await import('crypto');
1266
- *
1267
- * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
1268
- * modulusLength: 2048,
1269
- * });
1270
- *
1271
- * const sign = createSign('SHA256');
1272
- * sign.update('some data to sign');
1273
- * sign.end();
1274
- * const signature = sign.sign(privateKey);
1275
- *
1276
- * const verify = createVerify('SHA256');
1277
- * verify.update('some data to sign');
1278
- * verify.end();
1279
- * console.log(verify.verify(publicKey, signature));
1280
- * // Prints: true
1281
- * ```
1282
- * @since v0.1.92
1283
- */
1284
- class Sign extends stream.Writable {
1285
- private constructor();
1286
- /**
1287
- * Updates the `Sign` content with the given `data`, the encoding of which
1288
- * is given in `inputEncoding`.
1289
- * If `encoding` is not provided, and the `data` is a string, an
1290
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
1291
- *
1292
- * This can be called many times with new data as it is streamed.
1293
- * @since v0.1.92
1294
- * @param inputEncoding The `encoding` of the `data` string.
1295
- */
1296
- update(data: BinaryLike): this;
1297
- update(data: string, inputEncoding: Encoding): this;
1298
- /**
1299
- * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
1300
- *
1301
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
1302
- * object, the following additional properties can be passed:
1303
- *
1304
- * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
1305
- *
1306
- * The `Sign` object can not be again used after `sign.sign()` method has been
1307
- * called. Multiple calls to `sign.sign()` will result in an error being thrown.
1308
- * @since v0.1.92
1309
- */
1310
- sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
1311
- sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
1312
- }
1313
- /**
1314
- * Creates and returns a `Verify` object that uses the given algorithm.
1315
- * Use {@link getHashes} to obtain an array of names of the available
1316
- * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
1317
- *
1318
- * In some cases, a `Verify` instance can be created using the name of a signature
1319
- * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
1320
- * the corresponding digest algorithm. This does not work for all signature
1321
- * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
1322
- * algorithm names.
1323
- * @since v0.1.92
1324
- * @param options `stream.Writable` options
1325
- */
1326
- function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
1327
- /**
1328
- * The `Verify` class is a utility for verifying signatures. It can be used in one
1329
- * of two ways:
1330
- *
1331
- * * As a writable `stream` where written data is used to validate against the
1332
- * supplied signature, or
1333
- * * Using the `verify.update()` and `verify.verify()` methods to verify
1334
- * the signature.
1335
- *
1336
- * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword.
1337
- *
1338
- * See `Sign` for examples.
1339
- * @since v0.1.92
1340
- */
1341
- class Verify extends stream.Writable {
1342
- private constructor();
1343
- /**
1344
- * Updates the `Verify` content with the given `data`, the encoding of which
1345
- * is given in `inputEncoding`.
1346
- * If `inputEncoding` is not provided, and the `data` is a string, an
1347
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
1348
- *
1349
- * This can be called many times with new data as it is streamed.
1350
- * @since v0.1.92
1351
- * @param inputEncoding The `encoding` of the `data` string.
1352
- */
1353
- update(data: BinaryLike): Verify;
1354
- update(data: string, inputEncoding: Encoding): Verify;
1355
- /**
1356
- * Verifies the provided data using the given `object` and `signature`.
1357
- *
1358
- * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
1359
- * object, the following additional properties can be passed:
1360
- *
1361
- * The `signature` argument is the previously calculated signature for the data, in
1362
- * the `signatureEncoding`.
1363
- * If a `signatureEncoding` is specified, the `signature` is expected to be a
1364
- * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
1365
- *
1366
- * The `verify` object can not be used again after `verify.verify()` has been
1367
- * called. Multiple calls to `verify.verify()` will result in an error being
1368
- * thrown.
1369
- *
1370
- * Because public keys can be derived from private keys, a private key may
1371
- * be passed instead of a public key.
1372
- * @since v0.1.92
1373
- */
1374
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
1375
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: BinaryToTextEncoding): boolean;
1376
- }
1377
- /**
1378
- * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
1379
- * optional specific `generator`.
1380
- *
1381
- * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
1382
- *
1383
- * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
1384
- * a `Buffer`, `TypedArray`, or `DataView` is expected.
1385
- *
1386
- * If `generatorEncoding` is specified, `generator` is expected to be a string;
1387
- * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
1388
- * @since v0.11.12
1389
- * @param primeEncoding The `encoding` of the `prime` string.
1390
- * @param [generator=2]
1391
- * @param generatorEncoding The `encoding` of the `generator` string.
1392
- */
1393
- function createDiffieHellman(primeLength: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
1394
- function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
1395
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding): DiffieHellman;
1396
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
1397
- function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
1398
- /**
1399
- * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
1400
- * exchanges.
1401
- *
1402
- * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
1403
- *
1404
- * ```js
1405
- * import assert from 'assert';
1406
- *
1407
- * const {
1408
- * createDiffieHellman
1409
- * } = await import('crypto');
1410
- *
1411
- * // Generate Alice's keys...
1412
- * const alice = createDiffieHellman(2048);
1413
- * const aliceKey = alice.generateKeys();
1414
- *
1415
- * // Generate Bob's keys...
1416
- * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
1417
- * const bobKey = bob.generateKeys();
1418
- *
1419
- * // Exchange and generate the secret...
1420
- * const aliceSecret = alice.computeSecret(bobKey);
1421
- * const bobSecret = bob.computeSecret(aliceKey);
1422
- *
1423
- * // OK
1424
- * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
1425
- * ```
1426
- * @since v0.5.0
1427
- */
1428
- class DiffieHellman {
1429
- private constructor();
1430
- /**
1431
- * Generates private and public Diffie-Hellman key values, and returns
1432
- * the public key in the specified `encoding`. This key should be
1433
- * transferred to the other party.
1434
- * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
1435
- * @since v0.5.0
1436
- * @param encoding The `encoding` of the return value.
1437
- */
1438
- generateKeys(): Buffer;
1439
- generateKeys(encoding: BinaryToTextEncoding): string;
1440
- /**
1441
- * Computes the shared secret using `otherPublicKey` as the other
1442
- * party's public key and returns the computed shared secret. The supplied
1443
- * key is interpreted using the specified `inputEncoding`, and secret is
1444
- * encoded using specified `outputEncoding`.
1445
- * If the `inputEncoding` is not
1446
- * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
1447
- *
1448
- * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
1449
- * @since v0.5.0
1450
- * @param inputEncoding The `encoding` of an `otherPublicKey` string.
1451
- * @param outputEncoding The `encoding` of the return value.
1452
- */
1453
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
1454
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
1455
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
1456
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
1457
- /**
1458
- * Returns the Diffie-Hellman prime in the specified `encoding`.
1459
- * If `encoding` is provided a string is
1460
- * returned; otherwise a `Buffer` is returned.
1461
- * @since v0.5.0
1462
- * @param encoding The `encoding` of the return value.
1463
- */
1464
- getPrime(): Buffer;
1465
- getPrime(encoding: BinaryToTextEncoding): string;
1466
- /**
1467
- * Returns the Diffie-Hellman generator in the specified `encoding`.
1468
- * If `encoding` is provided a string is
1469
- * returned; otherwise a `Buffer` is returned.
1470
- * @since v0.5.0
1471
- * @param encoding The `encoding` of the return value.
1472
- */
1473
- getGenerator(): Buffer;
1474
- getGenerator(encoding: BinaryToTextEncoding): string;
1475
- /**
1476
- * Returns the Diffie-Hellman public key in the specified `encoding`.
1477
- * If `encoding` is provided a
1478
- * string is returned; otherwise a `Buffer` is returned.
1479
- * @since v0.5.0
1480
- * @param encoding The `encoding` of the return value.
1481
- */
1482
- getPublicKey(): Buffer;
1483
- getPublicKey(encoding: BinaryToTextEncoding): string;
1484
- /**
1485
- * Returns the Diffie-Hellman private key in the specified `encoding`.
1486
- * If `encoding` is provided a
1487
- * string is returned; otherwise a `Buffer` is returned.
1488
- * @since v0.5.0
1489
- * @param encoding The `encoding` of the return value.
1490
- */
1491
- getPrivateKey(): Buffer;
1492
- getPrivateKey(encoding: BinaryToTextEncoding): string;
1493
- /**
1494
- * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected
1495
- * to be a string. If no `encoding` is provided, `publicKey` is expected
1496
- * to be a `Buffer`, `TypedArray`, or `DataView`.
1497
- * @since v0.5.0
1498
- * @param encoding The `encoding` of the `publicKey` string.
1499
- */
1500
- setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
1501
- setPublicKey(publicKey: string, encoding: BufferEncoding): void;
1502
- /**
1503
- * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
1504
- * to be a string. If no `encoding` is provided, `privateKey` is expected
1505
- * to be a `Buffer`, `TypedArray`, or `DataView`.
1506
- * @since v0.5.0
1507
- * @param encoding The `encoding` of the `privateKey` string.
1508
- */
1509
- setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
1510
- setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
1511
- /**
1512
- * A bit field containing any warnings and/or errors resulting from a check
1513
- * performed during initialization of the `DiffieHellman` object.
1514
- *
1515
- * The following values are valid for this property (as defined in `constants`module):
1516
- *
1517
- * * `DH_CHECK_P_NOT_SAFE_PRIME`
1518
- * * `DH_CHECK_P_NOT_PRIME`
1519
- * * `DH_UNABLE_TO_CHECK_GENERATOR`
1520
- * * `DH_NOT_SUITABLE_GENERATOR`
1521
- * @since v0.11.12
1522
- */
1523
- verifyError: number;
1524
- }
1525
- /**
1526
- * Creates a predefined `DiffieHellmanGroup` key exchange object. The
1527
- * 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'`,
1528
- * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The
1529
- * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
1530
- * the keys (with `diffieHellman.setPublicKey()`, for example). The
1531
- * advantage of using this method is that the parties do not have to
1532
- * generate nor exchange a group modulus beforehand, saving both processor
1533
- * and communication time.
1534
- *
1535
- * Example (obtaining a shared secret):
1536
- *
1537
- * ```js
1538
- * const {
1539
- * getDiffieHellman
1540
- * } = await import('crypto');
1541
- * const alice = getDiffieHellman('modp14');
1542
- * const bob = getDiffieHellman('modp14');
1543
- *
1544
- * alice.generateKeys();
1545
- * bob.generateKeys();
1546
- *
1547
- * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
1548
- * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
1549
- *
1550
- * // aliceSecret and bobSecret should be the same
1551
- * console.log(aliceSecret === bobSecret);
1552
- * ```
1553
- * @since v0.7.5
1554
- */
1555
- function getDiffieHellman(groupName: string): DiffieHellman;
1556
- /**
1557
- * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
1558
- * implementation. A selected HMAC digest algorithm specified by `digest` is
1559
- * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
1560
- *
1561
- * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
1562
- * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
1563
- * thrown if any of the input arguments specify invalid values or types.
1564
- *
1565
- * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
1566
- * please specify a `digest` explicitly.
1567
- *
1568
- * The `iterations` argument must be a number set as high as possible. The
1569
- * higher the number of iterations, the more secure the derived key will be,
1570
- * but will take a longer amount of time to complete.
1571
- *
1572
- * The `salt` should be as unique as possible. It is recommended that a salt is
1573
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
1574
- *
1575
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
1576
- *
1577
- * ```js
1578
- * const {
1579
- * pbkdf2
1580
- * } = await import('crypto');
1581
- *
1582
- * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
1583
- * if (err) throw err;
1584
- * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
1585
- * });
1586
- * ```
1587
- *
1588
- * The `crypto.DEFAULT_ENCODING` property can be used to change the way the`derivedKey` is passed to the callback. This property, however, has been
1589
- * deprecated and use should be avoided.
1590
- *
1591
- * ```js
1592
- * import crypto from 'crypto';
1593
- * crypto.DEFAULT_ENCODING = 'hex';
1594
- * crypto.pbkdf2('secret', 'salt', 100000, 512, 'sha512', (err, derivedKey) => {
1595
- * if (err) throw err;
1596
- * console.log(derivedKey); // '3745e48...aa39b34'
1597
- * });
1598
- * ```
1599
- *
1600
- * An array of supported digest functions can be retrieved using {@link getHashes}.
1601
- *
1602
- * This API uses libuv's threadpool, which can have surprising and
1603
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
1604
- * @since v0.5.5
1605
- */
1606
- function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
1607
- /**
1608
- * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
1609
- * implementation. A selected HMAC digest algorithm specified by `digest` is
1610
- * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
1611
- *
1612
- * If an error occurs an `Error` will be thrown, otherwise the derived key will be
1613
- * returned as a `Buffer`.
1614
- *
1615
- * If `digest` is `null`, `'sha1'` will be used. This behavior is deprecated,
1616
- * please specify a `digest` explicitly.
1617
- *
1618
- * The `iterations` argument must be a number set as high as possible. The
1619
- * higher the number of iterations, the more secure the derived key will be,
1620
- * but will take a longer amount of time to complete.
1621
- *
1622
- * The `salt` should be as unique as possible. It is recommended that a salt is
1623
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
1624
- *
1625
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
1626
- *
1627
- * ```js
1628
- * const {
1629
- * pbkdf2Sync
1630
- * } = await import('crypto');
1631
- *
1632
- * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
1633
- * console.log(key.toString('hex')); // '3745e48...08d59ae'
1634
- * ```
1635
- *
1636
- * The `crypto.DEFAULT_ENCODING` property may be used to change the way the`derivedKey` is returned. This property, however, is deprecated and use
1637
- * should be avoided.
1638
- *
1639
- * ```js
1640
- * import crypto from 'crypto';
1641
- * crypto.DEFAULT_ENCODING = 'hex';
1642
- * const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 512, 'sha512');
1643
- * console.log(key); // '3745e48...aa39b34'
1644
- * ```
1645
- *
1646
- * An array of supported digest functions can be retrieved using {@link getHashes}.
1647
- * @since v0.9.3
1648
- */
1649
- function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
1650
- /**
1651
- * Generates cryptographically strong pseudorandom data. The `size` argument
1652
- * is a number indicating the number of bytes to generate.
1653
- *
1654
- * If a `callback` function is provided, the bytes are generated asynchronously
1655
- * and the `callback` function is invoked with two arguments: `err` and `buf`.
1656
- * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
1657
- *
1658
- * ```js
1659
- * // Asynchronous
1660
- * const {
1661
- * randomBytes
1662
- * } = await import('crypto');
1663
- *
1664
- * randomBytes(256, (err, buf) => {
1665
- * if (err) throw err;
1666
- * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
1667
- * });
1668
- * ```
1669
- *
1670
- * If the `callback` function is not provided, the random bytes are generated
1671
- * synchronously and returned as a `Buffer`. An error will be thrown if
1672
- * there is a problem generating the bytes.
1673
- *
1674
- * ```js
1675
- * // Synchronous
1676
- * const {
1677
- * randomBytes
1678
- * } = await import('crypto');
1679
- *
1680
- * const buf = randomBytes(256);
1681
- * console.log(
1682
- * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
1683
- * ```
1684
- *
1685
- * The `crypto.randomBytes()` method will not complete until there is
1686
- * sufficient entropy available.
1687
- * This should normally never take longer than a few milliseconds. The only time
1688
- * when generating the random bytes may conceivably block for a longer period of
1689
- * time is right after boot, when the whole system is still low on entropy.
1690
- *
1691
- * This API uses libuv's threadpool, which can have surprising and
1692
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
1693
- *
1694
- * The asynchronous version of `crypto.randomBytes()` is carried out in a single
1695
- * threadpool request. To minimize threadpool task length variation, partition
1696
- * large `randomBytes` requests when doing so as part of fulfilling a client
1697
- * request.
1698
- * @since v0.5.8
1699
- * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
1700
- * @return if the `callback` function is not provided.
1701
- */
1702
- function randomBytes(size: number): Buffer;
1703
- function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
1704
- function pseudoRandomBytes(size: number): Buffer;
1705
- function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
1706
- /**
1707
- * Return a random integer `n` such that `min <= n < max`. This
1708
- * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
1709
- *
1710
- * The range (`max - min`) must be less than 248. `min` and `max` must
1711
- * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
1712
- *
1713
- * If the `callback` function is not provided, the random integer is
1714
- * generated synchronously.
1715
- *
1716
- * ```js
1717
- * // Asynchronous
1718
- * const {
1719
- * randomInt
1720
- * } = await import('crypto');
1721
- *
1722
- * randomInt(3, (err, n) => {
1723
- * if (err) throw err;
1724
- * console.log(`Random number chosen from (0, 1, 2): ${n}`);
1725
- * });
1726
- * ```
1727
- *
1728
- * ```js
1729
- * // Synchronous
1730
- * const {
1731
- * randomInt
1732
- * } = await import('crypto');
1733
- *
1734
- * const n = randomInt(3);
1735
- * console.log(`Random number chosen from (0, 1, 2): ${n}`);
1736
- * ```
1737
- *
1738
- * ```js
1739
- * // With `min` argument
1740
- * const {
1741
- * randomInt
1742
- * } = await import('crypto');
1743
- *
1744
- * const n = randomInt(1, 7);
1745
- * console.log(`The dice rolled: ${n}`);
1746
- * ```
1747
- * @since v14.10.0, v12.19.0
1748
- * @param [min=0] Start of random range (inclusive).
1749
- * @param max End of random range (exclusive).
1750
- * @param callback `function(err, n) {}`.
1751
- */
1752
- function randomInt(max: number): number;
1753
- function randomInt(min: number, max: number): number;
1754
- function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
1755
- function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
1756
- /**
1757
- * Synchronous version of {@link randomFill}.
1758
- *
1759
- * ```js
1760
- * import { Buffer } from 'buffer';
1761
- * const { randomFillSync } = await import('crypto');
1762
- *
1763
- * const buf = Buffer.alloc(10);
1764
- * console.log(randomFillSync(buf).toString('hex'));
1765
- *
1766
- * randomFillSync(buf, 5);
1767
- * console.log(buf.toString('hex'));
1768
- *
1769
- * // The above is equivalent to the following:
1770
- * randomFillSync(buf, 5, 5);
1771
- * console.log(buf.toString('hex'));
1772
- * ```
1773
- *
1774
- * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
1775
- *
1776
- * ```js
1777
- * import { Buffer } from 'buffer';
1778
- * const { randomFillSync } = await import('crypto');
1779
- *
1780
- * const a = new Uint32Array(10);
1781
- * console.log(Buffer.from(randomFillSync(a).buffer,
1782
- * a.byteOffset, a.byteLength).toString('hex'));
1783
- *
1784
- * const b = new DataView(new ArrayBuffer(10));
1785
- * console.log(Buffer.from(randomFillSync(b).buffer,
1786
- * b.byteOffset, b.byteLength).toString('hex'));
1787
- *
1788
- * const c = new ArrayBuffer(10);
1789
- * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
1790
- * ```
1791
- * @since v7.10.0, v6.13.0
1792
- * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
1793
- * @param [offset=0]
1794
- * @param [size=buffer.length - offset]
1795
- * @return The object passed as `buffer` argument.
1796
- */
1797
- function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
1798
- /**
1799
- * This function is similar to {@link randomBytes} but requires the first
1800
- * argument to be a `Buffer` that will be filled. It also
1801
- * requires that a callback is passed in.
1802
- *
1803
- * If the `callback` function is not provided, an error will be thrown.
1804
- *
1805
- * ```js
1806
- * import { Buffer } from 'buffer';
1807
- * const { randomFill } = await import('crypto');
1808
- *
1809
- * const buf = Buffer.alloc(10);
1810
- * randomFill(buf, (err, buf) => {
1811
- * if (err) throw err;
1812
- * console.log(buf.toString('hex'));
1813
- * });
1814
- *
1815
- * randomFill(buf, 5, (err, buf) => {
1816
- * if (err) throw err;
1817
- * console.log(buf.toString('hex'));
1818
- * });
1819
- *
1820
- * // The above is equivalent to the following:
1821
- * randomFill(buf, 5, 5, (err, buf) => {
1822
- * if (err) throw err;
1823
- * console.log(buf.toString('hex'));
1824
- * });
1825
- * ```
1826
- *
1827
- * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
1828
- *
1829
- * While this includes instances of `Float32Array` and `Float64Array`, this
1830
- * function should not be used to generate random floating-point numbers. The
1831
- * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
1832
- * contains finite numbers only, they are not drawn from a uniform random
1833
- * distribution and have no meaningful lower or upper bounds.
1834
- *
1835
- * ```js
1836
- * import { Buffer } from 'buffer';
1837
- * const { randomFill } = await import('crypto');
1838
- *
1839
- * const a = new Uint32Array(10);
1840
- * randomFill(a, (err, buf) => {
1841
- * if (err) throw err;
1842
- * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
1843
- * .toString('hex'));
1844
- * });
1845
- *
1846
- * const b = new DataView(new ArrayBuffer(10));
1847
- * randomFill(b, (err, buf) => {
1848
- * if (err) throw err;
1849
- * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
1850
- * .toString('hex'));
1851
- * });
1852
- *
1853
- * const c = new ArrayBuffer(10);
1854
- * randomFill(c, (err, buf) => {
1855
- * if (err) throw err;
1856
- * console.log(Buffer.from(buf).toString('hex'));
1857
- * });
1858
- * ```
1859
- *
1860
- * This API uses libuv's threadpool, which can have surprising and
1861
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
1862
- *
1863
- * The asynchronous version of `crypto.randomFill()` is carried out in a single
1864
- * threadpool request. To minimize threadpool task length variation, partition
1865
- * large `randomFill` requests when doing so as part of fulfilling a client
1866
- * request.
1867
- * @since v7.10.0, v6.13.0
1868
- * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
1869
- * @param [offset=0]
1870
- * @param [size=buffer.length - offset]
1871
- * @param callback `function(err, buf) {}`.
1872
- */
1873
- function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
1874
- function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
1875
- function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
1876
- interface ScryptOptions {
1877
- cost?: number | undefined;
1878
- blockSize?: number | undefined;
1879
- parallelization?: number | undefined;
1880
- N?: number | undefined;
1881
- r?: number | undefined;
1882
- p?: number | undefined;
1883
- maxmem?: number | undefined;
1884
- }
1885
- /**
1886
- * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
1887
- * key derivation function that is designed to be expensive computationally and
1888
- * memory-wise in order to make brute-force attacks unrewarding.
1889
- *
1890
- * The `salt` should be as unique as possible. It is recommended that a salt is
1891
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
1892
- *
1893
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
1894
- *
1895
- * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the
1896
- * callback as a `Buffer`.
1897
- *
1898
- * An exception is thrown when any of the input arguments specify invalid values
1899
- * or types.
1900
- *
1901
- * ```js
1902
- * const {
1903
- * scrypt
1904
- * } = await import('crypto');
1905
- *
1906
- * // Using the factory defaults.
1907
- * scrypt('password', 'salt', 64, (err, derivedKey) => {
1908
- * if (err) throw err;
1909
- * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
1910
- * });
1911
- * // Using a custom N parameter. Must be a power of two.
1912
- * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
1913
- * if (err) throw err;
1914
- * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
1915
- * });
1916
- * ```
1917
- * @since v10.5.0
1918
- */
1919
- function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void): void;
1920
- function scrypt(password: BinaryLike, salt: BinaryLike, keylen: number, options: ScryptOptions, callback: (err: Error | null, derivedKey: Buffer) => void): void;
1921
- /**
1922
- * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
1923
- * key derivation function that is designed to be expensive computationally and
1924
- * memory-wise in order to make brute-force attacks unrewarding.
1925
- *
1926
- * The `salt` should be as unique as possible. It is recommended that a salt is
1927
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
1928
- *
1929
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
1930
- *
1931
- * An exception is thrown when key derivation fails, otherwise the derived key is
1932
- * returned as a `Buffer`.
1933
- *
1934
- * An exception is thrown when any of the input arguments specify invalid values
1935
- * or types.
1936
- *
1937
- * ```js
1938
- * const {
1939
- * scryptSync
1940
- * } = await import('crypto');
1941
- * // Using the factory defaults.
1942
- *
1943
- * const key1 = scryptSync('password', 'salt', 64);
1944
- * console.log(key1.toString('hex')); // '3745e48...08d59ae'
1945
- * // Using a custom N parameter. Must be a power of two.
1946
- * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
1947
- * console.log(key2.toString('hex')); // '3745e48...aa39b34'
1948
- * ```
1949
- * @since v10.5.0
1950
- */
1951
- function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
1952
- interface RsaPublicKey {
1953
- key: KeyLike;
1954
- padding?: number | undefined;
1955
- }
1956
- interface RsaPrivateKey {
1957
- key: KeyLike;
1958
- passphrase?: string | undefined;
1959
- /**
1960
- * @default 'sha1'
1961
- */
1962
- oaepHash?: string | undefined;
1963
- oaepLabel?: NodeJS.TypedArray | undefined;
1964
- padding?: number | undefined;
1965
- }
1966
- /**
1967
- * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
1968
- * the corresponding private key, for example using {@link privateDecrypt}.
1969
- *
1970
- * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
1971
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
1972
- *
1973
- * Because RSA public keys can be derived from private keys, a private key may
1974
- * be passed instead of a public key.
1975
- * @since v0.11.14
1976
- */
1977
- function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
1978
- /**
1979
- * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
1980
- * the corresponding private key, for example using {@link privateEncrypt}.
1981
- *
1982
- * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
1983
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
1984
- *
1985
- * Because RSA public keys can be derived from private keys, a private key may
1986
- * be passed instead of a public key.
1987
- * @since v1.1.0
1988
- */
1989
- function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
1990
- /**
1991
- * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
1992
- * the corresponding public key, for example using {@link publicEncrypt}.
1993
- *
1994
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
1995
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
1996
- * @since v0.11.14
1997
- */
1998
- function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
1999
- /**
2000
- * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
2001
- * the corresponding public key, for example using {@link publicDecrypt}.
2002
- *
2003
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
2004
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
2005
- * @since v1.1.0
2006
- */
2007
- function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
2008
- /**
2009
- * ```js
2010
- * const {
2011
- * getCiphers
2012
- * } = await import('crypto');
2013
- *
2014
- * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
2015
- * ```
2016
- * @since v0.9.3
2017
- * @return An array with the names of the supported cipher algorithms.
2018
- */
2019
- function getCiphers(): string[];
2020
- /**
2021
- * ```js
2022
- * const {
2023
- * getCurves
2024
- * } = await import('crypto');
2025
- *
2026
- * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
2027
- * ```
2028
- * @since v2.3.0
2029
- * @return An array with the names of the supported elliptic curves.
2030
- */
2031
- function getCurves(): string[];
2032
- /**
2033
- * @since v10.0.0
2034
- * @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}.
2035
- */
2036
- function getFips(): 1 | 0;
2037
- /**
2038
- * ```js
2039
- * const {
2040
- * getHashes
2041
- * } = await import('crypto');
2042
- *
2043
- * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
2044
- * ```
2045
- * @since v0.9.3
2046
- * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
2047
- */
2048
- function getHashes(): string[];
2049
- /**
2050
- * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
2051
- * key exchanges.
2052
- *
2053
- * Instances of the `ECDH` class can be created using the {@link createECDH} function.
2054
- *
2055
- * ```js
2056
- * import assert from 'assert';
2057
- *
2058
- * const {
2059
- * createECDH
2060
- * } = await import('crypto');
2061
- *
2062
- * // Generate Alice's keys...
2063
- * const alice = createECDH('secp521r1');
2064
- * const aliceKey = alice.generateKeys();
2065
- *
2066
- * // Generate Bob's keys...
2067
- * const bob = createECDH('secp521r1');
2068
- * const bobKey = bob.generateKeys();
2069
- *
2070
- * // Exchange and generate the secret...
2071
- * const aliceSecret = alice.computeSecret(bobKey);
2072
- * const bobSecret = bob.computeSecret(aliceKey);
2073
- *
2074
- * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
2075
- * // OK
2076
- * ```
2077
- * @since v0.11.14
2078
- */
2079
- class ECDH {
2080
- private constructor();
2081
- /**
2082
- * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
2083
- * format specified by `format`. The `format` argument specifies point encoding
2084
- * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
2085
- * interpreted using the specified `inputEncoding`, and the returned key is encoded
2086
- * using the specified `outputEncoding`.
2087
- *
2088
- * Use {@link getCurves} to obtain a list of available curve names.
2089
- * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
2090
- * the name and description of each available elliptic curve.
2091
- *
2092
- * If `format` is not specified the point will be returned in `'uncompressed'`format.
2093
- *
2094
- * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
2095
- *
2096
- * Example (uncompressing a key):
2097
- *
2098
- * ```js
2099
- * const {
2100
- * createECDH,
2101
- * ECDH
2102
- * } = await import('crypto');
2103
- *
2104
- * const ecdh = createECDH('secp256k1');
2105
- * ecdh.generateKeys();
2106
- *
2107
- * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
2108
- *
2109
- * const uncompressedKey = ECDH.convertKey(compressedKey,
2110
- * 'secp256k1',
2111
- * 'hex',
2112
- * 'hex',
2113
- * 'uncompressed');
2114
- *
2115
- * // The converted key and the uncompressed public key should be the same
2116
- * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
2117
- * ```
2118
- * @since v10.0.0
2119
- * @param inputEncoding The `encoding` of the `key` string.
2120
- * @param outputEncoding The `encoding` of the return value.
2121
- * @param [format='uncompressed']
2122
- */
2123
- static convertKey(
2124
- key: BinaryLike,
2125
- curve: string,
2126
- inputEncoding?: BinaryToTextEncoding,
2127
- outputEncoding?: 'latin1' | 'hex' | 'base64',
2128
- format?: 'uncompressed' | 'compressed' | 'hybrid'
2129
- ): Buffer | string;
2130
- /**
2131
- * Generates private and public EC Diffie-Hellman key values, and returns
2132
- * the public key in the specified `format` and `encoding`. This key should be
2133
- * transferred to the other party.
2134
- *
2135
- * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
2136
- *
2137
- * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
2138
- * @since v0.11.14
2139
- * @param encoding The `encoding` of the return value.
2140
- * @param [format='uncompressed']
2141
- */
2142
- generateKeys(): Buffer;
2143
- generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
2144
- /**
2145
- * Computes the shared secret using `otherPublicKey` as the other
2146
- * party's public key and returns the computed shared secret. The supplied
2147
- * key is interpreted using specified `inputEncoding`, and the returned secret
2148
- * is encoded using the specified `outputEncoding`.
2149
- * If the `inputEncoding` is not
2150
- * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
2151
- *
2152
- * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
2153
- *
2154
- * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
2155
- * usually supplied from a remote user over an insecure network,
2156
- * be sure to handle this exception accordingly.
2157
- * @since v0.11.14
2158
- * @param inputEncoding The `encoding` of the `otherPublicKey` string.
2159
- * @param outputEncoding The `encoding` of the return value.
2160
- */
2161
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
2162
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
2163
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
2164
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
2165
- /**
2166
- * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
2167
- * returned.
2168
- * @since v0.11.14
2169
- * @param encoding The `encoding` of the return value.
2170
- * @return The EC Diffie-Hellman in the specified `encoding`.
2171
- */
2172
- getPrivateKey(): Buffer;
2173
- getPrivateKey(encoding: BinaryToTextEncoding): string;
2174
- /**
2175
- * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
2176
- *
2177
- * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
2178
- * returned.
2179
- * @since v0.11.14
2180
- * @param encoding The `encoding` of the return value.
2181
- * @param [format='uncompressed']
2182
- * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
2183
- */
2184
- getPublicKey(): Buffer;
2185
- getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
2186
- /**
2187
- * Sets the EC Diffie-Hellman private key.
2188
- * If `encoding` is provided, `privateKey` is expected
2189
- * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
2190
- *
2191
- * If `privateKey` is not valid for the curve specified when the `ECDH` object was
2192
- * created, an error is thrown. Upon setting the private key, the associated
2193
- * public point (key) is also generated and set in the `ECDH` object.
2194
- * @since v0.11.14
2195
- * @param encoding The `encoding` of the `privateKey` string.
2196
- */
2197
- setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
2198
- setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
2199
- }
2200
- /**
2201
- * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
2202
- * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
2203
- * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
2204
- * and description of each available elliptic curve.
2205
- * @since v0.11.14
2206
- */
2207
- function createECDH(curveName: string): ECDH;
2208
- /**
2209
- * This function is based on a constant-time algorithm.
2210
- * Returns true if `a` is equal to `b`, without leaking timing information that
2211
- * would allow an attacker to guess one of the values. This is suitable for
2212
- * comparing HMAC digests or secret values like authentication cookies or[capability urls](https://www.w3.org/TR/capability-urls/).
2213
- *
2214
- * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
2215
- * must have the same byte length.
2216
- *
2217
- * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
2218
- * entry, such as `Uint16Array`, the result will be computed using the platform
2219
- * byte order.
2220
- *
2221
- * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
2222
- * is timing-safe. Care should be taken to ensure that the surrounding code does
2223
- * not introduce timing vulnerabilities.
2224
- * @since v6.6.0
2225
- */
2226
- function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
2227
- /** @deprecated since v10.0.0 */
2228
- const DEFAULT_ENCODING: BufferEncoding;
2229
- type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
2230
- type KeyFormat = 'pem' | 'der';
2231
- interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
2232
- format: T;
2233
- cipher?: string | undefined;
2234
- passphrase?: string | undefined;
2235
- }
2236
- interface KeyPairKeyObjectResult {
2237
- publicKey: KeyObject;
2238
- privateKey: KeyObject;
2239
- }
2240
- interface ED25519KeyPairKeyObjectOptions {}
2241
- interface ED448KeyPairKeyObjectOptions {}
2242
- interface X25519KeyPairKeyObjectOptions {}
2243
- interface X448KeyPairKeyObjectOptions {}
2244
- interface ECKeyPairKeyObjectOptions {
2245
- /**
2246
- * Name of the curve to use.
2247
- */
2248
- namedCurve: string;
2249
- }
2250
- interface RSAKeyPairKeyObjectOptions {
2251
- /**
2252
- * Key size in bits
2253
- */
2254
- modulusLength: number;
2255
- /**
2256
- * @default 0x10001
2257
- */
2258
- publicExponent?: number | undefined;
2259
- }
2260
- interface RSAPSSKeyPairKeyObjectOptions {
2261
- /**
2262
- * Key size in bits
2263
- */
2264
- modulusLength: number;
2265
- /**
2266
- * @default 0x10001
2267
- */
2268
- publicExponent?: number | undefined;
2269
- }
2270
- interface DSAKeyPairKeyObjectOptions {
2271
- /**
2272
- * Key size in bits
2273
- */
2274
- modulusLength: number;
2275
- /**
2276
- * Size of q in bits
2277
- */
2278
- divisorLength: number;
2279
- }
2280
- interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2281
- /**
2282
- * Key size in bits
2283
- */
2284
- modulusLength: number;
2285
- /**
2286
- * @default 0x10001
2287
- */
2288
- publicExponent?: number | undefined;
2289
- publicKeyEncoding: {
2290
- type: 'pkcs1' | 'spki';
2291
- format: PubF;
2292
- };
2293
- privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2294
- type: 'pkcs1' | 'pkcs8';
2295
- };
2296
- }
2297
- interface RSAPSSKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2298
- /**
2299
- * Key size in bits
2300
- */
2301
- modulusLength: number;
2302
- /**
2303
- * @default 0x10001
2304
- */
2305
- publicExponent?: number | undefined;
2306
- publicKeyEncoding: {
2307
- type: 'spki';
2308
- format: PubF;
2309
- };
2310
- privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2311
- type: 'pkcs8';
2312
- };
2313
- }
2314
- interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2315
- /**
2316
- * Key size in bits
2317
- */
2318
- modulusLength: number;
2319
- /**
2320
- * Size of q in bits
2321
- */
2322
- divisorLength: number;
2323
- publicKeyEncoding: {
2324
- type: 'spki';
2325
- format: PubF;
2326
- };
2327
- privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2328
- type: 'pkcs8';
2329
- };
2330
- }
2331
- interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2332
- /**
2333
- * Name of the curve to use.
2334
- */
2335
- namedCurve: string;
2336
- publicKeyEncoding: {
2337
- type: 'pkcs1' | 'spki';
2338
- format: PubF;
2339
- };
2340
- privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2341
- type: 'sec1' | 'pkcs8';
2342
- };
2343
- }
2344
- interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2345
- publicKeyEncoding: {
2346
- type: 'spki';
2347
- format: PubF;
2348
- };
2349
- privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2350
- type: 'pkcs8';
2351
- };
2352
- }
2353
- interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2354
- publicKeyEncoding: {
2355
- type: 'spki';
2356
- format: PubF;
2357
- };
2358
- privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2359
- type: 'pkcs8';
2360
- };
2361
- }
2362
- interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2363
- publicKeyEncoding: {
2364
- type: 'spki';
2365
- format: PubF;
2366
- };
2367
- privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2368
- type: 'pkcs8';
2369
- };
2370
- }
2371
- interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2372
- publicKeyEncoding: {
2373
- type: 'spki';
2374
- format: PubF;
2375
- };
2376
- privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2377
- type: 'pkcs8';
2378
- };
2379
- }
2380
- interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
2381
- publicKey: T1;
2382
- privateKey: T2;
2383
- }
2384
- /**
2385
- * Generates a new asymmetric key pair of the given `type`. RSA, DSA, EC, Ed25519,
2386
- * Ed448, X25519, X448, and DH are currently supported.
2387
- *
2388
- * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2389
- * behaves as if `keyObject.export()` had been called on its result. Otherwise,
2390
- * the respective part of the key is returned as a `KeyObject`.
2391
- *
2392
- * When encoding public keys, it is recommended to use `'spki'`. When encoding
2393
- * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
2394
- * and to keep the passphrase confidential.
2395
- *
2396
- * ```js
2397
- * const {
2398
- * generateKeyPairSync
2399
- * } = await import('crypto');
2400
- *
2401
- * const {
2402
- * publicKey,
2403
- * privateKey,
2404
- * } = generateKeyPairSync('rsa', {
2405
- * modulusLength: 4096,
2406
- * publicKeyEncoding: {
2407
- * type: 'spki',
2408
- * format: 'pem'
2409
- * },
2410
- * privateKeyEncoding: {
2411
- * type: 'pkcs8',
2412
- * format: 'pem',
2413
- * cipher: 'aes-256-cbc',
2414
- * passphrase: 'top secret'
2415
- * }
2416
- * });
2417
- * ```
2418
- *
2419
- * The return value `{ publicKey, privateKey }` represents the generated key pair.
2420
- * When PEM encoding was selected, the respective key will be a string, otherwise
2421
- * it will be a buffer containing the data encoded as DER.
2422
- * @since v10.12.0
2423
- * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2424
- */
2425
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2426
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2427
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2428
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2429
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2430
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2431
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2432
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2433
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2434
- function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2435
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2436
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2437
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2438
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2439
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2440
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2441
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2442
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2443
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2444
- function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2445
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2446
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2447
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2448
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2449
- function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2450
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2451
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2452
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2453
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2454
- function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2455
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2456
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2457
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2458
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2459
- function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2460
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2461
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2462
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2463
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2464
- function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2465
- /**
2466
- * Generates a new asymmetric key pair of the given `type`. RSA, DSA, EC, Ed25519,
2467
- * Ed448, X25519, X448, and DH are currently supported.
2468
- *
2469
- * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2470
- * behaves as if `keyObject.export()` had been called on its result. Otherwise,
2471
- * the respective part of the key is returned as a `KeyObject`.
2472
- *
2473
- * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage:
2474
- *
2475
- * ```js
2476
- * const {
2477
- * generateKeyPair
2478
- * } = await import('crypto');
2479
- *
2480
- * generateKeyPair('rsa', {
2481
- * modulusLength: 4096,
2482
- * publicKeyEncoding: {
2483
- * type: 'spki',
2484
- * format: 'pem'
2485
- * },
2486
- * privateKeyEncoding: {
2487
- * type: 'pkcs8',
2488
- * format: 'pem',
2489
- * cipher: 'aes-256-cbc',
2490
- * passphrase: 'top secret'
2491
- * }
2492
- * }, (err, publicKey, privateKey) => {
2493
- * // Handle errors and use the generated key pair.
2494
- * });
2495
- * ```
2496
- *
2497
- * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair.
2498
- *
2499
- * If this method is invoked as its `util.promisify()` ed version, it returns
2500
- * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
2501
- * @since v10.12.0
2502
- * @param type Must be `'rsa'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2503
- */
2504
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2505
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2506
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2507
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2508
- function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2509
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2510
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2511
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2512
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2513
- function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2514
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2515
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2516
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2517
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2518
- function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2519
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2520
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2521
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2522
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2523
- function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2524
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2525
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2526
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2527
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2528
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2529
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2530
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2531
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2532
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2533
- function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2534
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2535
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2536
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2537
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2538
- function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2539
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2540
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2541
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2542
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2543
- function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2544
- namespace generateKeyPair {
2545
- function __promisify__(
2546
- type: 'rsa',
2547
- options: RSAKeyPairOptions<'pem', 'pem'>
2548
- ): Promise<{
2549
- publicKey: string;
2550
- privateKey: string;
2551
- }>;
2552
- function __promisify__(
2553
- type: 'rsa',
2554
- options: RSAKeyPairOptions<'pem', 'der'>
2555
- ): Promise<{
2556
- publicKey: string;
2557
- privateKey: Buffer;
2558
- }>;
2559
- function __promisify__(
2560
- type: 'rsa',
2561
- options: RSAKeyPairOptions<'der', 'pem'>
2562
- ): Promise<{
2563
- publicKey: Buffer;
2564
- privateKey: string;
2565
- }>;
2566
- function __promisify__(
2567
- type: 'rsa',
2568
- options: RSAKeyPairOptions<'der', 'der'>
2569
- ): Promise<{
2570
- publicKey: Buffer;
2571
- privateKey: Buffer;
2572
- }>;
2573
- function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2574
- function __promisify__(
2575
- type: 'rsa-pss',
2576
- options: RSAPSSKeyPairOptions<'pem', 'pem'>
2577
- ): Promise<{
2578
- publicKey: string;
2579
- privateKey: string;
2580
- }>;
2581
- function __promisify__(
2582
- type: 'rsa-pss',
2583
- options: RSAPSSKeyPairOptions<'pem', 'der'>
2584
- ): Promise<{
2585
- publicKey: string;
2586
- privateKey: Buffer;
2587
- }>;
2588
- function __promisify__(
2589
- type: 'rsa-pss',
2590
- options: RSAPSSKeyPairOptions<'der', 'pem'>
2591
- ): Promise<{
2592
- publicKey: Buffer;
2593
- privateKey: string;
2594
- }>;
2595
- function __promisify__(
2596
- type: 'rsa-pss',
2597
- options: RSAPSSKeyPairOptions<'der', 'der'>
2598
- ): Promise<{
2599
- publicKey: Buffer;
2600
- privateKey: Buffer;
2601
- }>;
2602
- function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2603
- function __promisify__(
2604
- type: 'dsa',
2605
- options: DSAKeyPairOptions<'pem', 'pem'>
2606
- ): Promise<{
2607
- publicKey: string;
2608
- privateKey: string;
2609
- }>;
2610
- function __promisify__(
2611
- type: 'dsa',
2612
- options: DSAKeyPairOptions<'pem', 'der'>
2613
- ): Promise<{
2614
- publicKey: string;
2615
- privateKey: Buffer;
2616
- }>;
2617
- function __promisify__(
2618
- type: 'dsa',
2619
- options: DSAKeyPairOptions<'der', 'pem'>
2620
- ): Promise<{
2621
- publicKey: Buffer;
2622
- privateKey: string;
2623
- }>;
2624
- function __promisify__(
2625
- type: 'dsa',
2626
- options: DSAKeyPairOptions<'der', 'der'>
2627
- ): Promise<{
2628
- publicKey: Buffer;
2629
- privateKey: Buffer;
2630
- }>;
2631
- function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2632
- function __promisify__(
2633
- type: 'ec',
2634
- options: ECKeyPairOptions<'pem', 'pem'>
2635
- ): Promise<{
2636
- publicKey: string;
2637
- privateKey: string;
2638
- }>;
2639
- function __promisify__(
2640
- type: 'ec',
2641
- options: ECKeyPairOptions<'pem', 'der'>
2642
- ): Promise<{
2643
- publicKey: string;
2644
- privateKey: Buffer;
2645
- }>;
2646
- function __promisify__(
2647
- type: 'ec',
2648
- options: ECKeyPairOptions<'der', 'pem'>
2649
- ): Promise<{
2650
- publicKey: Buffer;
2651
- privateKey: string;
2652
- }>;
2653
- function __promisify__(
2654
- type: 'ec',
2655
- options: ECKeyPairOptions<'der', 'der'>
2656
- ): Promise<{
2657
- publicKey: Buffer;
2658
- privateKey: Buffer;
2659
- }>;
2660
- function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2661
- function __promisify__(
2662
- type: 'ed25519',
2663
- options: ED25519KeyPairOptions<'pem', 'pem'>
2664
- ): Promise<{
2665
- publicKey: string;
2666
- privateKey: string;
2667
- }>;
2668
- function __promisify__(
2669
- type: 'ed25519',
2670
- options: ED25519KeyPairOptions<'pem', 'der'>
2671
- ): Promise<{
2672
- publicKey: string;
2673
- privateKey: Buffer;
2674
- }>;
2675
- function __promisify__(
2676
- type: 'ed25519',
2677
- options: ED25519KeyPairOptions<'der', 'pem'>
2678
- ): Promise<{
2679
- publicKey: Buffer;
2680
- privateKey: string;
2681
- }>;
2682
- function __promisify__(
2683
- type: 'ed25519',
2684
- options: ED25519KeyPairOptions<'der', 'der'>
2685
- ): Promise<{
2686
- publicKey: Buffer;
2687
- privateKey: Buffer;
2688
- }>;
2689
- function __promisify__(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2690
- function __promisify__(
2691
- type: 'ed448',
2692
- options: ED448KeyPairOptions<'pem', 'pem'>
2693
- ): Promise<{
2694
- publicKey: string;
2695
- privateKey: string;
2696
- }>;
2697
- function __promisify__(
2698
- type: 'ed448',
2699
- options: ED448KeyPairOptions<'pem', 'der'>
2700
- ): Promise<{
2701
- publicKey: string;
2702
- privateKey: Buffer;
2703
- }>;
2704
- function __promisify__(
2705
- type: 'ed448',
2706
- options: ED448KeyPairOptions<'der', 'pem'>
2707
- ): Promise<{
2708
- publicKey: Buffer;
2709
- privateKey: string;
2710
- }>;
2711
- function __promisify__(
2712
- type: 'ed448',
2713
- options: ED448KeyPairOptions<'der', 'der'>
2714
- ): Promise<{
2715
- publicKey: Buffer;
2716
- privateKey: Buffer;
2717
- }>;
2718
- function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2719
- function __promisify__(
2720
- type: 'x25519',
2721
- options: X25519KeyPairOptions<'pem', 'pem'>
2722
- ): Promise<{
2723
- publicKey: string;
2724
- privateKey: string;
2725
- }>;
2726
- function __promisify__(
2727
- type: 'x25519',
2728
- options: X25519KeyPairOptions<'pem', 'der'>
2729
- ): Promise<{
2730
- publicKey: string;
2731
- privateKey: Buffer;
2732
- }>;
2733
- function __promisify__(
2734
- type: 'x25519',
2735
- options: X25519KeyPairOptions<'der', 'pem'>
2736
- ): Promise<{
2737
- publicKey: Buffer;
2738
- privateKey: string;
2739
- }>;
2740
- function __promisify__(
2741
- type: 'x25519',
2742
- options: X25519KeyPairOptions<'der', 'der'>
2743
- ): Promise<{
2744
- publicKey: Buffer;
2745
- privateKey: Buffer;
2746
- }>;
2747
- function __promisify__(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2748
- function __promisify__(
2749
- type: 'x448',
2750
- options: X448KeyPairOptions<'pem', 'pem'>
2751
- ): Promise<{
2752
- publicKey: string;
2753
- privateKey: string;
2754
- }>;
2755
- function __promisify__(
2756
- type: 'x448',
2757
- options: X448KeyPairOptions<'pem', 'der'>
2758
- ): Promise<{
2759
- publicKey: string;
2760
- privateKey: Buffer;
2761
- }>;
2762
- function __promisify__(
2763
- type: 'x448',
2764
- options: X448KeyPairOptions<'der', 'pem'>
2765
- ): Promise<{
2766
- publicKey: Buffer;
2767
- privateKey: string;
2768
- }>;
2769
- function __promisify__(
2770
- type: 'x448',
2771
- options: X448KeyPairOptions<'der', 'der'>
2772
- ): Promise<{
2773
- publicKey: Buffer;
2774
- privateKey: Buffer;
2775
- }>;
2776
- function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2777
- }
2778
- /**
2779
- * Calculates and returns the signature for `data` using the given private key and
2780
- * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
2781
- * dependent upon the key type (especially Ed25519 and Ed448).
2782
- *
2783
- * If `key` is not a `KeyObject`, this function behaves as if `key` had been
2784
- * passed to {@link createPrivateKey}. If it is an object, the following
2785
- * additional properties can be passed:
2786
- *
2787
- * If the `callback` function is provided this function uses libuv's threadpool.
2788
- * @since v12.0.0
2789
- */
2790
- function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
2791
- function sign(
2792
- algorithm: string | null | undefined,
2793
- data: NodeJS.ArrayBufferView,
2794
- key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
2795
- callback: (error: Error | null, data: Buffer) => void
2796
- ): void;
2797
- /**
2798
- * 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
2799
- * key type (especially Ed25519 and Ed448).
2800
- *
2801
- * If `key` is not a `KeyObject`, this function behaves as if `key` had been
2802
- * passed to {@link createPublicKey}. If it is an object, the following
2803
- * additional properties can be passed:
2804
- *
2805
- * The `signature` argument is the previously calculated signature for the `data`.
2806
- *
2807
- * Because public keys can be derived from private keys, a private key or a public
2808
- * key may be passed for `key`.
2809
- *
2810
- * If the `callback` function is provided this function uses libuv's threadpool.
2811
- * @since v12.0.0
2812
- */
2813
- function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
2814
- function verify(
2815
- algorithm: string | null | undefined,
2816
- data: NodeJS.ArrayBufferView,
2817
- key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
2818
- signature: NodeJS.ArrayBufferView,
2819
- callback: (error: Error | null, result: boolean) => void
2820
- ): void;
2821
- /**
2822
- * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
2823
- * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
2824
- * @since v13.9.0, v12.17.0
2825
- */
2826
- function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
2827
- type CipherMode = 'cbc' | 'ccm' | 'cfb' | 'ctr' | 'ecb' | 'gcm' | 'ocb' | 'ofb' | 'stream' | 'wrap' | 'xts';
2828
- interface CipherInfoOptions {
2829
- /**
2830
- * A test key length.
2831
- */
2832
- keyLength?: number | undefined;
2833
- /**
2834
- * A test IV length.
2835
- */
2836
- ivLength?: number | undefined;
2837
- }
2838
- interface CipherInfo {
2839
- /**
2840
- * The name of the cipher.
2841
- */
2842
- name: string;
2843
- /**
2844
- * The nid of the cipher.
2845
- */
2846
- nid: number;
2847
- /**
2848
- * The block size of the cipher in bytes.
2849
- * This property is omitted when mode is 'stream'.
2850
- */
2851
- blockSize?: number | undefined;
2852
- /**
2853
- * The expected or default initialization vector length in bytes.
2854
- * This property is omitted if the cipher does not use an initialization vector.
2855
- */
2856
- ivLength?: number | undefined;
2857
- /**
2858
- * The expected or default key length in bytes.
2859
- */
2860
- keyLength: number;
2861
- /**
2862
- * The cipher mode.
2863
- */
2864
- mode: CipherMode;
2865
- }
2866
- /**
2867
- * Returns information about a given cipher.
2868
- *
2869
- * Some ciphers accept variable length keys and initialization vectors. By default,
2870
- * the `crypto.getCipherInfo()` method will return the default values for these
2871
- * ciphers. To test if a given key length or iv length is acceptable for given
2872
- * cipher, use the `keyLength` and `ivLength` options. If the given values are
2873
- * unacceptable, `undefined` will be returned.
2874
- * @since v15.0.0
2875
- * @param nameOrNid The name or nid of the cipher to query.
2876
- */
2877
- function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined;
2878
- /**
2879
- * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
2880
- *
2881
- * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
2882
- * otherwise `err` will be `null`. The successfully generated `derivedKey` will
2883
- * be passed to the callback as an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
2884
- * of the input arguments specify invalid values or types.
2885
- *
2886
- * ```js
2887
- * import { Buffer } from 'buffer';
2888
- * const {
2889
- * hkdf
2890
- * } = await import('crypto');
2891
- *
2892
- * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => {
2893
- * if (err) throw err;
2894
- * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
2895
- * });
2896
- * ```
2897
- * @since v15.0.0
2898
- * @param digest The digest algorithm to use.
2899
- * @param ikm The input keying material. It must be at least one byte in length.
2900
- * @param salt The salt value. Must be provided but can be zero-length.
2901
- * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
2902
- * @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`
2903
- * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
2904
- */
2905
- function hkdf(digest: string, irm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number, callback: (err: Error | null, derivedKey: ArrayBuffer) => void): void;
2906
- /**
2907
- * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
2908
- * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
2909
- *
2910
- * The successfully generated `derivedKey` will be returned as an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
2911
- *
2912
- * An error will be thrown if any of the input arguments specify invalid values or
2913
- * types, or if the derived key cannot be generated.
2914
- *
2915
- * ```js
2916
- * import { Buffer } from 'buffer';
2917
- * const {
2918
- * hkdfSync
2919
- * } = await import('crypto');
2920
- *
2921
- * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64);
2922
- * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653'
2923
- * ```
2924
- * @since v15.0.0
2925
- * @param digest The digest algorithm to use.
2926
- * @param ikm The input keying material. It must be at least one byte in length.
2927
- * @param salt The salt value. Must be provided but can be zero-length.
2928
- * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
2929
- * @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`
2930
- * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
2931
- */
2932
- function hkdfSync(digest: string, ikm: BinaryLike | KeyObject, salt: BinaryLike, info: BinaryLike, keylen: number): ArrayBuffer;
2933
- interface SecureHeapUsage {
2934
- /**
2935
- * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag.
2936
- */
2937
- total: number;
2938
- /**
2939
- * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag.
2940
- */
2941
- min: number;
2942
- /**
2943
- * The total number of bytes currently allocated from the secure heap.
2944
- */
2945
- used: number;
2946
- /**
2947
- * The calculated ratio of `used` to `total` allocated bytes.
2948
- */
2949
- utilization: number;
2950
- }
2951
- /**
2952
- * @since v15.6.0
2953
- */
2954
- function secureHeapUsed(): SecureHeapUsage;
2955
- interface RandomUUIDOptions {
2956
- /**
2957
- * By default, to improve performance,
2958
- * Node.js will pre-emptively generate and persistently cache enough
2959
- * random data to generate up to 128 random UUIDs. To generate a UUID
2960
- * without using the cache, set `disableEntropyCache` to `true`.
2961
- *
2962
- * @default `false`
2963
- */
2964
- disableEntropyCache?: boolean | undefined;
2965
- }
2966
- /**
2967
- * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
2968
- * cryptographic pseudorandom number generator.
2969
- * @since v15.6.0
2970
- */
2971
- function randomUUID(options?: RandomUUIDOptions): string;
2972
- interface X509CheckOptions {
2973
- /**
2974
- * @default 'always'
2975
- */
2976
- subject: 'always' | 'never';
2977
- /**
2978
- * @default true
2979
- */
2980
- wildcards: boolean;
2981
- /**
2982
- * @default true
2983
- */
2984
- partialWildcards: boolean;
2985
- /**
2986
- * @default false
2987
- */
2988
- multiLabelWildcards: boolean;
2989
- /**
2990
- * @default false
2991
- */
2992
- singleLabelSubdomains: boolean;
2993
- }
2994
- /**
2995
- * Encapsulates an X509 certificate and provides read-only access to
2996
- * its information.
2997
- *
2998
- * ```js
2999
- * const { X509Certificate } = await import('crypto');
3000
- *
3001
- * const x509 = new X509Certificate('{... pem encoded cert ...}');
3002
- *
3003
- * console.log(x509.subject);
3004
- * ```
3005
- * @since v15.6.0
3006
- */
3007
- class X509Certificate {
3008
- /**
3009
- * Will be \`true\` if this is a Certificate Authority (ca) certificate.
3010
- * @since v15.6.0
3011
- */
3012
- readonly ca: boolean;
3013
- /**
3014
- * The SHA-1 fingerprint of this certificate.
3015
- * @since v15.6.0
3016
- */
3017
- readonly fingerprint: string;
3018
- /**
3019
- * The SHA-256 fingerprint of this certificate.
3020
- * @since v15.6.0
3021
- */
3022
- readonly fingerprint256: string;
3023
- /**
3024
- * The complete subject of this certificate.
3025
- * @since v15.6.0
3026
- */
3027
- readonly subject: string;
3028
- /**
3029
- * The subject alternative name specified for this certificate.
3030
- * @since v15.6.0
3031
- */
3032
- readonly subjectAltName: string;
3033
- /**
3034
- * The information access content of this certificate.
3035
- * @since v15.6.0
3036
- */
3037
- readonly infoAccess: string;
3038
- /**
3039
- * An array detailing the key usages for this certificate.
3040
- * @since v15.6.0
3041
- */
3042
- readonly keyUsage: string[];
3043
- /**
3044
- * The issuer identification included in this certificate.
3045
- * @since v15.6.0
3046
- */
3047
- readonly issuer: string;
3048
- /**
3049
- * The issuer certificate or `undefined` if the issuer certificate is not
3050
- * available.
3051
- * @since v15.9.0
3052
- */
3053
- readonly issuerCertificate?: X509Certificate | undefined;
3054
- /**
3055
- * The public key `KeyObject` for this certificate.
3056
- * @since v15.6.0
3057
- */
3058
- readonly publicKey: KeyObject;
3059
- /**
3060
- * A `Buffer` containing the DER encoding of this certificate.
3061
- * @since v15.6.0
3062
- */
3063
- readonly raw: Buffer;
3064
- /**
3065
- * The serial number of this certificate.
3066
- * @since v15.6.0
3067
- */
3068
- readonly serialNumber: string;
3069
- /**
3070
- * The date/time from which this certificate is considered valid.
3071
- * @since v15.6.0
3072
- */
3073
- readonly validFrom: string;
3074
- /**
3075
- * The date/time until which this certificate is considered valid.
3076
- * @since v15.6.0
3077
- */
3078
- readonly validTo: string;
3079
- constructor(buffer: BinaryLike);
3080
- /**
3081
- * Checks whether the certificate matches the given email address.
3082
- * @since v15.6.0
3083
- * @return Returns `email` if the certificate matches, `undefined` if it does not.
3084
- */
3085
- checkEmail(email: string, options?: X509CheckOptions): string | undefined;
3086
- /**
3087
- * Checks whether the certificate matches the given host name.
3088
- * @since v15.6.0
3089
- * @return Returns `name` if the certificate matches, `undefined` if it does not.
3090
- */
3091
- checkHost(name: string, options?: X509CheckOptions): string | undefined;
3092
- /**
3093
- * Checks whether the certificate matches the given IP address (IPv4 or IPv6).
3094
- * @since v15.6.0
3095
- * @return Returns `ip` if the certificate matches, `undefined` if it does not.
3096
- */
3097
- checkIP(ip: string, options?: X509CheckOptions): string | undefined;
3098
- /**
3099
- * Checks whether this certificate was issued by the given `otherCert`.
3100
- * @since v15.6.0
3101
- */
3102
- checkIssued(otherCert: X509Certificate): boolean;
3103
- /**
3104
- * Checks whether the public key for this certificate is consistent with
3105
- * the given private key.
3106
- * @since v15.6.0
3107
- * @param privateKey A private key.
3108
- */
3109
- checkPrivateKey(privateKey: KeyObject): boolean;
3110
- /**
3111
- * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded
3112
- * certificate.
3113
- * @since v15.6.0
3114
- */
3115
- toJSON(): string;
3116
- /**
3117
- * Returns information about this certificate using the legacy `certificate object` encoding.
3118
- * @since v15.6.0
3119
- */
3120
- toLegacyObject(): PeerCertificate;
3121
- /**
3122
- * Returns the PEM-encoded certificate.
3123
- * @since v15.6.0
3124
- */
3125
- toString(): string;
3126
- /**
3127
- * Verifies that this certificate was signed by the given public key.
3128
- * Does not perform any other validation checks on the certificate.
3129
- * @since v15.6.0
3130
- * @param publicKey A public key.
3131
- */
3132
- verify(publicKey: KeyObject): boolean;
3133
- }
3134
- type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint;
3135
- interface GeneratePrimeOptions {
3136
- add?: LargeNumberLike | undefined;
3137
- rem?: LargeNumberLike | undefined;
3138
- /**
3139
- * @default false
3140
- */
3141
- safe?: boolean | undefined;
3142
- bigint?: boolean | undefined;
3143
- }
3144
- interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions {
3145
- bigint: true;
3146
- }
3147
- interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions {
3148
- bigint?: false | undefined;
3149
- }
3150
- /**
3151
- * Generates a pseudorandom prime of `size` bits.
3152
- *
3153
- * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
3154
- *
3155
- * The `options.add` and `options.rem` parameters can be used to enforce additional
3156
- * requirements, e.g., for Diffie-Hellman:
3157
- *
3158
- * * If `options.add` and `options.rem` are both set, the prime will satisfy the
3159
- * condition that `prime % add = rem`.
3160
- * * If only `options.add` is set and `options.safe` is not `true`, the prime will
3161
- * satisfy the condition that `prime % add = 1`.
3162
- * * If only `options.add` is set and `options.safe` is set to `true`, the prime
3163
- * will instead satisfy the condition that `prime % add = 3`. This is necessary
3164
- * because `prime % add = 1` for `options.add > 2` would contradict the condition
3165
- * enforced by `options.safe`.
3166
- * * `options.rem` is ignored if `options.add` is not given.
3167
- *
3168
- * Both `options.add` and `options.rem` must be encoded as big-endian sequences
3169
- * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3170
- *
3171
- * By default, the prime is encoded as a big-endian sequence of octets
3172
- * in an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
3173
- * [&lt;bigint&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)is provided.
3174
- * @since v15.8.0
3175
- * @param size The size (in bits) of the prime to generate.
3176
- */
3177
- function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
3178
- function generatePrime(size: number, options: GeneratePrimeOptionsBigInt, callback: (err: Error | null, prime: bigint) => void): void;
3179
- function generatePrime(size: number, options: GeneratePrimeOptionsArrayBuffer, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
3180
- function generatePrime(size: number, options: GeneratePrimeOptions, callback: (err: Error | null, prime: ArrayBuffer | bigint) => void): void;
3181
- /**
3182
- * Generates a pseudorandom prime of `size` bits.
3183
- *
3184
- * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
3185
- *
3186
- * The `options.add` and `options.rem` parameters can be used to enforce additional
3187
- * requirements, e.g., for Diffie-Hellman:
3188
- *
3189
- * * If `options.add` and `options.rem` are both set, the prime will satisfy the
3190
- * condition that `prime % add = rem`.
3191
- * * If only `options.add` is set and `options.safe` is not `true`, the prime will
3192
- * satisfy the condition that `prime % add = 1`.
3193
- * * If only `options.add` is set and `options.safe` is set to `true`, the prime
3194
- * will instead satisfy the condition that `prime % add = 3`. This is necessary
3195
- * because `prime % add = 1` for `options.add > 2` would contradict the condition
3196
- * enforced by `options.safe`.
3197
- * * `options.rem` is ignored if `options.add` is not given.
3198
- *
3199
- * Both `options.add` and `options.rem` must be encoded as big-endian sequences
3200
- * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3201
- *
3202
- * By default, the prime is encoded as a big-endian sequence of octets
3203
- * in an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
3204
- * [&lt;bigint&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)is provided.
3205
- * @since v15.8.0
3206
- * @param size The size (in bits) of the prime to generate.
3207
- */
3208
- function generatePrimeSync(size: number): ArrayBuffer;
3209
- function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
3210
- function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer;
3211
- function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint;
3212
- interface CheckPrimeOptions {
3213
- /**
3214
- * The number of Miller-Rabin probabilistic primality iterations to perform.
3215
- * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most 2-64 for random input.
3216
- * Care must be used when selecting a number of checks.
3217
- * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details.
3218
- *
3219
- * @default 0
3220
- */
3221
- checks?: number | undefined;
3222
- }
3223
- /**
3224
- * Checks the primality of the `candidate`.
3225
- * @since v15.8.0
3226
- * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
3227
- */
3228
- function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void;
3229
- function checkPrime(value: LargeNumberLike, options: CheckPrimeOptions, callback: (err: Error | null, result: boolean) => void): void;
3230
- /**
3231
- * Checks the primality of the `candidate`.
3232
- * @since v15.8.0
3233
- * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
3234
- * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`.
3235
- */
3236
- function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
3237
- namespace webcrypto {
3238
- class CryptoKey {} // placeholder
3239
- }
3240
- }
3241
- declare module 'node:crypto' {
3242
- export * from 'crypto';
3243
- }