meteor-node-stubs 1.2.17 → 1.2.19

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 (460) hide show
  1. package/node_modules/@meteorjs/browserify-sign/browser/sign.js +1 -1
  2. package/node_modules/@meteorjs/browserify-sign/browser/verify.js +1 -1
  3. package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/jodid.js +82 -0
  4. package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/secp256k1.js +41 -0
  5. package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/index.js +153 -0
  6. package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/package.json +21 -0
  7. package/node_modules/@meteorjs/browserify-sign/elliptic/dist/.gitkeep +0 -0
  8. package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.js +8961 -0
  9. package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.min.js +1 -0
  10. package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic.js +1 -1
  11. package/node_modules/@meteorjs/browserify-sign/elliptic/test/api-test.js +20 -0
  12. package/node_modules/@meteorjs/browserify-sign/elliptic/test/curve-test.js +357 -0
  13. package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdh-test.js +43 -0
  14. package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdsa-test.js +547 -0
  15. package/node_modules/@meteorjs/browserify-sign/elliptic/test/ed25519-test.js +138 -0
  16. package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
  17. package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/sign.input +1024 -0
  18. package/node_modules/@meteorjs/browserify-sign/elliptic/test/index.js +10 -0
  19. package/node_modules/@meteorjs/browserify-sign/elliptic/test/unittests.html +39 -0
  20. package/node_modules/@meteorjs/browserify-sign/package.json +22 -5
  21. package/node_modules/@meteorjs/create-ecdh/browser.js +1 -1
  22. package/node_modules/@meteorjs/create-ecdh/elliptic/README.md +238 -0
  23. package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/jodid.js +82 -0
  24. package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/secp256k1.js +41 -0
  25. package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/index.js +153 -0
  26. package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/package.json +21 -0
  27. package/node_modules/@meteorjs/create-ecdh/elliptic/dist/.gitkeep +0 -0
  28. package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.js +8961 -0
  29. package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.min.js +1 -0
  30. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/base.js +381 -0
  31. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/edwards.js +435 -0
  32. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/index.js +8 -0
  33. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/mont.js +178 -0
  34. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/short.js +938 -0
  35. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curves.js +206 -0
  36. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/index.js +278 -0
  37. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/key.js +121 -0
  38. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/signature.js +176 -0
  39. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/index.js +121 -0
  40. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/key.js +95 -0
  41. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/signature.js +66 -0
  42. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/precomputed/secp256k1.js +780 -0
  43. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/utils.js +122 -0
  44. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic.js +13 -0
  45. package/node_modules/@meteorjs/create-ecdh/elliptic/test/api-test.js +20 -0
  46. package/node_modules/@meteorjs/create-ecdh/elliptic/test/curve-test.js +357 -0
  47. package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdh-test.js +43 -0
  48. package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdsa-test.js +547 -0
  49. package/node_modules/@meteorjs/create-ecdh/elliptic/test/ed25519-test.js +138 -0
  50. package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
  51. package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/sign.input +1024 -0
  52. package/node_modules/@meteorjs/create-ecdh/elliptic/test/index.js +10 -0
  53. package/node_modules/@meteorjs/create-ecdh/elliptic/test/unittests.html +39 -0
  54. package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/lib/bn.js +1 -0
  55. package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/package.json +1 -1
  56. package/node_modules/@meteorjs/create-ecdh/package.json +23 -5
  57. package/node_modules/asn1.js/node_modules/bn.js/lib/bn.js +6 -5
  58. package/node_modules/asn1.js/node_modules/bn.js/package.json +1 -1
  59. package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo.js +65 -0
  60. package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  61. package/node_modules/available-typed-arrays/.eslintrc +0 -4
  62. package/node_modules/available-typed-arrays/CHANGELOG.md +21 -0
  63. package/node_modules/available-typed-arrays/README.md +16 -13
  64. package/node_modules/available-typed-arrays/index.d.ts +8 -0
  65. package/node_modules/available-typed-arrays/index.js +4 -14
  66. package/node_modules/available-typed-arrays/package.json +26 -15
  67. package/node_modules/available-typed-arrays/tsconfig.json +49 -0
  68. package/node_modules/bn.js/README.md +11 -5
  69. package/node_modules/bn.js/lib/bn.js +6 -5
  70. package/node_modules/bn.js/package.json +1 -1
  71. package/node_modules/browserify-rsa/CHANGELOG.md +98 -0
  72. package/node_modules/browserify-rsa/README.md +0 -2
  73. package/node_modules/browserify-rsa/index.js +31 -28
  74. package/node_modules/browserify-rsa/package.json +64 -29
  75. package/node_modules/call-bind/CHANGELOG.md +13 -0
  76. package/node_modules/call-bind/index.js +6 -17
  77. package/node_modules/call-bind/package.json +14 -16
  78. package/node_modules/call-bind/test/index.js +4 -10
  79. package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  80. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  81. package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  82. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  83. package/node_modules/{has-proto → call-bind-apply-helpers}/LICENSE +1 -1
  84. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  85. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  86. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  87. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  88. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  89. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  90. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  91. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  92. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  93. package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  94. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  95. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  96. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  97. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  98. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  99. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  100. package/node_modules/call-bound/.eslintrc +13 -0
  101. package/node_modules/call-bound/.github/FUNDING.yml +12 -0
  102. package/node_modules/call-bound/.nycrc +9 -0
  103. package/node_modules/call-bound/CHANGELOG.md +42 -0
  104. package/node_modules/{@meteorjs/browserify-sign/node_modules/bn.js → call-bound}/LICENSE +3 -1
  105. package/node_modules/call-bound/README.md +53 -0
  106. package/node_modules/call-bound/index.d.ts +94 -0
  107. package/node_modules/call-bound/index.js +19 -0
  108. package/node_modules/call-bound/package.json +99 -0
  109. package/node_modules/call-bound/test/index.js +61 -0
  110. package/node_modules/call-bound/tsconfig.json +10 -0
  111. package/node_modules/cipher-base/.eslintrc +24 -1
  112. package/node_modules/cipher-base/.github/FUNDING.yml +12 -0
  113. package/node_modules/cipher-base/CHANGELOG.md +66 -0
  114. package/node_modules/cipher-base/index.js +145 -77
  115. package/node_modules/cipher-base/package.json +60 -30
  116. package/node_modules/cipher-base/test/index.js +221 -0
  117. package/node_modules/des.js/lib/des/cipher.js +1 -0
  118. package/node_modules/des.js/lib/des/des.js +8 -0
  119. package/node_modules/des.js/package.json +3 -4
  120. package/node_modules/des.js/test/cbc-test.js +5 -5
  121. package/node_modules/des.js/test/des-test.js +9 -9
  122. package/node_modules/des.js/test/ede-test.js +39 -6
  123. package/node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js +6 -5
  124. package/node_modules/diffie-hellman/node_modules/bn.js/package.json +1 -1
  125. package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo.js +65 -0
  126. package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  127. package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  128. package/node_modules/dunder-proto/.nycrc +13 -0
  129. package/node_modules/dunder-proto/CHANGELOG.md +24 -0
  130. package/node_modules/{@meteorjs/crypto-browserify/node_modules/hash-base → dunder-proto}/LICENSE +6 -6
  131. package/node_modules/dunder-proto/README.md +54 -0
  132. package/node_modules/dunder-proto/get.d.ts +5 -0
  133. package/node_modules/dunder-proto/get.js +30 -0
  134. package/node_modules/dunder-proto/package.json +76 -0
  135. package/node_modules/dunder-proto/set.d.ts +5 -0
  136. package/node_modules/dunder-proto/set.js +35 -0
  137. package/node_modules/dunder-proto/test/get.js +34 -0
  138. package/node_modules/dunder-proto/test/index.js +4 -0
  139. package/node_modules/dunder-proto/test/set.js +50 -0
  140. package/node_modules/dunder-proto/tsconfig.json +9 -0
  141. package/node_modules/es-define-property/CHANGELOG.md +14 -0
  142. package/node_modules/es-define-property/index.js +1 -3
  143. package/node_modules/es-define-property/package.json +12 -12
  144. package/node_modules/es-define-property/test/index.js +1 -0
  145. package/node_modules/es-define-property/tsconfig.json +2 -42
  146. package/node_modules/es-object-atoms/.eslintrc +16 -0
  147. package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  148. package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  149. package/node_modules/{elliptic/node_modules/bn.js → es-object-atoms}/LICENSE +3 -1
  150. package/node_modules/es-object-atoms/README.md +63 -0
  151. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  152. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  153. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  154. package/node_modules/es-object-atoms/ToObject.js +10 -0
  155. package/node_modules/es-object-atoms/index.d.ts +3 -0
  156. package/node_modules/es-object-atoms/index.js +4 -0
  157. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  158. package/node_modules/es-object-atoms/isObject.js +6 -0
  159. package/node_modules/es-object-atoms/package.json +80 -0
  160. package/node_modules/es-object-atoms/test/index.js +38 -0
  161. package/node_modules/es-object-atoms/tsconfig.json +6 -0
  162. package/node_modules/for-each/.eslintrc +16 -2
  163. package/node_modules/{has-proto → for-each}/.github/FUNDING.yml +1 -1
  164. package/node_modules/for-each/.github/SECURITY.md +3 -0
  165. package/node_modules/for-each/.nycrc +8 -0
  166. package/node_modules/for-each/CHANGELOG.md +107 -0
  167. package/node_modules/for-each/README.md +0 -4
  168. package/node_modules/for-each/index.d.ts +35 -0
  169. package/node_modules/for-each/index.js +11 -4
  170. package/node_modules/for-each/package.json +47 -36
  171. package/node_modules/for-each/test/test.js +54 -12
  172. package/node_modules/for-each/tsconfig.json +8 -0
  173. package/node_modules/get-intrinsic/.eslintrc +4 -0
  174. package/node_modules/get-intrinsic/CHANGELOG.md +43 -0
  175. package/node_modules/get-intrinsic/index.js +40 -21
  176. package/node_modules/get-intrinsic/package.json +24 -20
  177. package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
  178. package/node_modules/get-proto/.eslintrc +10 -0
  179. package/node_modules/get-proto/.github/FUNDING.yml +12 -0
  180. package/node_modules/get-proto/.nycrc +9 -0
  181. package/node_modules/get-proto/CHANGELOG.md +21 -0
  182. package/node_modules/get-proto/LICENSE +21 -0
  183. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  184. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  185. package/node_modules/get-proto/README.md +50 -0
  186. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  187. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  188. package/node_modules/get-proto/index.d.ts +5 -0
  189. package/node_modules/get-proto/index.js +27 -0
  190. package/node_modules/{has-proto → get-proto}/package.json +33 -26
  191. package/node_modules/get-proto/test/index.js +68 -0
  192. package/node_modules/get-proto/tsconfig.json +9 -0
  193. package/node_modules/gopd/CHANGELOG.md +20 -0
  194. package/node_modules/gopd/gOPD.d.ts +1 -0
  195. package/node_modules/gopd/gOPD.js +4 -0
  196. package/node_modules/gopd/index.d.ts +5 -0
  197. package/node_modules/gopd/index.js +2 -3
  198. package/node_modules/gopd/package.json +16 -10
  199. package/node_modules/gopd/test/index.js +2 -1
  200. package/node_modules/gopd/tsconfig.json +9 -0
  201. package/node_modules/has-symbols/CHANGELOG.md +16 -0
  202. package/node_modules/has-symbols/index.d.ts +3 -0
  203. package/node_modules/has-symbols/index.js +1 -0
  204. package/node_modules/has-symbols/package.json +19 -9
  205. package/node_modules/has-symbols/shams.d.ts +3 -0
  206. package/node_modules/has-symbols/shams.js +5 -2
  207. package/node_modules/has-symbols/test/shams/core-js.js +1 -0
  208. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +1 -0
  209. package/node_modules/has-symbols/test/tests.js +4 -2
  210. package/node_modules/has-symbols/tsconfig.json +10 -0
  211. package/node_modules/has-tostringtag/.eslintrc +0 -6
  212. package/node_modules/has-tostringtag/.nycrc +13 -0
  213. package/node_modules/has-tostringtag/CHANGELOG.md +22 -0
  214. package/node_modules/has-tostringtag/index.d.ts +3 -0
  215. package/node_modules/has-tostringtag/index.js +1 -0
  216. package/node_modules/has-tostringtag/package.json +37 -13
  217. package/node_modules/has-tostringtag/shams.d.ts +3 -0
  218. package/node_modules/has-tostringtag/shams.js +1 -0
  219. package/node_modules/has-tostringtag/test/shams/core-js.js +3 -0
  220. package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +2 -0
  221. package/node_modules/has-tostringtag/test/tests.js +2 -1
  222. package/node_modules/has-tostringtag/tsconfig.json +49 -0
  223. package/node_modules/hash-base/README.md +15 -15
  224. package/node_modules/hash-base/index.js +52 -9
  225. package/node_modules/hash-base/package.json +40 -40
  226. package/node_modules/hasown/CHANGELOG.md +20 -0
  227. package/node_modules/hasown/index.d.ts +3 -3
  228. package/node_modules/hasown/index.js +1 -1
  229. package/node_modules/hasown/package.json +16 -15
  230. package/node_modules/hasown/tsconfig.json +3 -46
  231. package/node_modules/is-arguments/.eslintrc +0 -1
  232. package/node_modules/is-arguments/CHANGELOG.md +22 -0
  233. package/node_modules/is-arguments/README.md +11 -11
  234. package/node_modules/is-arguments/index.d.ts +6 -0
  235. package/node_modules/is-arguments/index.js +19 -8
  236. package/node_modules/is-arguments/package.json +25 -11
  237. package/node_modules/is-arguments/test/index.js +4 -1
  238. package/node_modules/is-arguments/tsconfig.json +9 -0
  239. package/node_modules/is-generator-function/.eslintrc +1 -1
  240. package/node_modules/is-generator-function/CHANGELOG.md +21 -0
  241. package/node_modules/is-generator-function/index.d.ts +3 -0
  242. package/node_modules/is-generator-function/index.js +16 -7
  243. package/node_modules/is-generator-function/package.json +30 -11
  244. package/node_modules/is-generator-function/test/corejs.js +1 -0
  245. package/node_modules/is-generator-function/test/index.js +4 -7
  246. package/node_modules/is-generator-function/test/uglified.js +1 -0
  247. package/node_modules/is-generator-function/tsconfig.json +9 -0
  248. package/node_modules/is-regex/.editorconfig +23 -0
  249. package/node_modules/is-regex/.eslintrc +10 -0
  250. package/node_modules/is-regex/.nycrc +10 -0
  251. package/node_modules/is-regex/CHANGELOG.md +233 -0
  252. package/node_modules/is-regex/LICENSE +20 -0
  253. package/node_modules/is-regex/README.md +52 -0
  254. package/node_modules/is-regex/index.d.ts +3 -0
  255. package/node_modules/is-regex/index.js +69 -0
  256. package/node_modules/is-regex/package.json +104 -0
  257. package/node_modules/is-regex/test/index.js +121 -0
  258. package/node_modules/is-regex/tsconfig.json +9 -0
  259. package/node_modules/is-typed-array/CHANGELOG.md +32 -0
  260. package/node_modules/is-typed-array/index.d.ts +9 -0
  261. package/node_modules/is-typed-array/index.js +1 -0
  262. package/node_modules/is-typed-array/package.json +23 -10
  263. package/node_modules/is-typed-array/test/index.js +9 -1
  264. package/node_modules/is-typed-array/tsconfig.json +6 -0
  265. package/node_modules/math-intrinsics/.eslintrc +16 -0
  266. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  267. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  268. package/node_modules/math-intrinsics/LICENSE +21 -0
  269. package/node_modules/math-intrinsics/README.md +50 -0
  270. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  271. package/node_modules/math-intrinsics/abs.js +4 -0
  272. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  273. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  274. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  275. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  276. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  277. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  278. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  279. package/node_modules/math-intrinsics/floor.js +4 -0
  280. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  281. package/node_modules/math-intrinsics/isFinite.js +12 -0
  282. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  283. package/node_modules/math-intrinsics/isInteger.js +16 -0
  284. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  285. package/node_modules/math-intrinsics/isNaN.js +6 -0
  286. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  287. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  288. package/node_modules/math-intrinsics/max.d.ts +1 -0
  289. package/node_modules/math-intrinsics/max.js +4 -0
  290. package/node_modules/math-intrinsics/min.d.ts +1 -0
  291. package/node_modules/math-intrinsics/min.js +4 -0
  292. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  293. package/node_modules/math-intrinsics/mod.js +9 -0
  294. package/node_modules/math-intrinsics/package.json +86 -0
  295. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  296. package/node_modules/math-intrinsics/pow.js +4 -0
  297. package/node_modules/math-intrinsics/round.d.ts +1 -0
  298. package/node_modules/math-intrinsics/round.js +4 -0
  299. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  300. package/node_modules/math-intrinsics/sign.js +11 -0
  301. package/node_modules/math-intrinsics/test/index.js +192 -0
  302. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  303. package/node_modules/miller-rabin/node_modules/bn.js/lib/bn.js +6 -5
  304. package/node_modules/miller-rabin/node_modules/bn.js/package.json +1 -1
  305. package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo.js +65 -0
  306. package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  307. package/node_modules/object-inspect/CHANGELOG.md +20 -0
  308. package/node_modules/object-inspect/index.js +27 -10
  309. package/node_modules/object-inspect/package.json +9 -8
  310. package/node_modules/object-inspect/test/quoteStyle.js +9 -0
  311. package/node_modules/object-inspect/test/values.js +50 -0
  312. package/node_modules/object-is/.eslintrc +1 -1
  313. package/node_modules/object-is/.nycrc +0 -4
  314. package/node_modules/object-is/CHANGELOG.md +25 -0
  315. package/node_modules/object-is/README.md +20 -20
  316. package/node_modules/object-is/package.json +23 -14
  317. package/node_modules/object.assign/CHANGELOG.md +21 -0
  318. package/node_modules/object.assign/dist/browser.js +495 -135
  319. package/node_modules/object.assign/implementation.js +6 -6
  320. package/node_modules/object.assign/package.json +14 -14
  321. package/node_modules/object.assign/test/tests.js +2 -2
  322. package/node_modules/possible-typed-array-names/.eslintrc +5 -0
  323. package/node_modules/possible-typed-array-names/.github/FUNDING.yml +12 -0
  324. package/node_modules/possible-typed-array-names/CHANGELOG.md +29 -0
  325. package/node_modules/possible-typed-array-names/LICENSE +21 -0
  326. package/node_modules/possible-typed-array-names/README.md +50 -0
  327. package/node_modules/possible-typed-array-names/index.d.ts +16 -0
  328. package/node_modules/possible-typed-array-names/index.js +17 -0
  329. package/node_modules/possible-typed-array-names/package.json +84 -0
  330. package/node_modules/possible-typed-array-names/test/index.js +19 -0
  331. package/node_modules/possible-typed-array-names/tsconfig.json +9 -0
  332. package/node_modules/public-encrypt/node_modules/bn.js/lib/bn.js +6 -5
  333. package/node_modules/public-encrypt/node_modules/bn.js/package.json +1 -1
  334. package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo.js +65 -0
  335. package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  336. package/node_modules/qs/.eslintrc +1 -0
  337. package/node_modules/qs/CHANGELOG.md +22 -0
  338. package/node_modules/qs/README.md +25 -1
  339. package/node_modules/qs/dist/qs.js +95 -44
  340. package/node_modules/qs/lib/parse.js +44 -12
  341. package/node_modules/qs/lib/stringify.js +11 -6
  342. package/node_modules/qs/lib/utils.js +7 -4
  343. package/node_modules/qs/package.json +9 -7
  344. package/node_modules/qs/test/parse.js +133 -27
  345. package/node_modules/qs/test/stringify.js +19 -11
  346. package/node_modules/qs/test/utils.js +126 -0
  347. package/node_modules/safe-regex-test/.eslintrc +9 -0
  348. package/node_modules/safe-regex-test/.github/FUNDING.yml +12 -0
  349. package/node_modules/safe-regex-test/.nycrc +13 -0
  350. package/node_modules/safe-regex-test/CHANGELOG.md +55 -0
  351. package/node_modules/safe-regex-test/LICENSE +21 -0
  352. package/node_modules/safe-regex-test/README.md +46 -0
  353. package/node_modules/safe-regex-test/index.d.ts +3 -0
  354. package/node_modules/safe-regex-test/index.js +17 -0
  355. package/node_modules/safe-regex-test/package.json +87 -0
  356. package/node_modules/safe-regex-test/test/index.js +41 -0
  357. package/node_modules/safe-regex-test/tsconfig.json +9 -0
  358. package/node_modules/side-channel/.eslintrc +1 -0
  359. package/node_modules/side-channel/CHANGELOG.md +15 -0
  360. package/node_modules/side-channel/README.md +60 -1
  361. package/node_modules/side-channel/index.d.ts +9 -22
  362. package/node_modules/side-channel/index.js +20 -106
  363. package/node_modules/side-channel/package.json +20 -19
  364. package/node_modules/side-channel/test/index.js +76 -55
  365. package/node_modules/side-channel/tsconfig.json +2 -43
  366. package/node_modules/side-channel-list/.editorconfig +9 -0
  367. package/node_modules/side-channel-list/.eslintrc +11 -0
  368. package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
  369. package/node_modules/side-channel-list/.nycrc +13 -0
  370. package/node_modules/side-channel-list/CHANGELOG.md +15 -0
  371. package/node_modules/side-channel-list/LICENSE +21 -0
  372. package/node_modules/side-channel-list/README.md +62 -0
  373. package/node_modules/side-channel-list/index.d.ts +13 -0
  374. package/node_modules/side-channel-list/index.js +113 -0
  375. package/node_modules/side-channel-list/list.d.ts +14 -0
  376. package/node_modules/side-channel-list/package.json +77 -0
  377. package/node_modules/side-channel-list/test/index.js +104 -0
  378. package/node_modules/side-channel-list/tsconfig.json +9 -0
  379. package/node_modules/side-channel-map/.editorconfig +9 -0
  380. package/node_modules/side-channel-map/.eslintrc +11 -0
  381. package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  382. package/node_modules/side-channel-map/.nycrc +13 -0
  383. package/node_modules/side-channel-map/CHANGELOG.md +22 -0
  384. package/node_modules/side-channel-map/LICENSE +21 -0
  385. package/node_modules/side-channel-map/README.md +62 -0
  386. package/node_modules/side-channel-map/index.d.ts +15 -0
  387. package/node_modules/side-channel-map/index.js +68 -0
  388. package/node_modules/side-channel-map/package.json +80 -0
  389. package/node_modules/side-channel-map/test/index.js +114 -0
  390. package/node_modules/side-channel-map/tsconfig.json +9 -0
  391. package/node_modules/side-channel-weakmap/.editorconfig +9 -0
  392. package/node_modules/side-channel-weakmap/.eslintrc +12 -0
  393. package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  394. package/node_modules/side-channel-weakmap/.nycrc +13 -0
  395. package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  396. package/node_modules/side-channel-weakmap/LICENSE +21 -0
  397. package/node_modules/side-channel-weakmap/README.md +62 -0
  398. package/node_modules/side-channel-weakmap/index.d.ts +15 -0
  399. package/node_modules/side-channel-weakmap/index.js +84 -0
  400. package/node_modules/side-channel-weakmap/package.json +87 -0
  401. package/node_modules/side-channel-weakmap/test/index.js +114 -0
  402. package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  403. package/node_modules/which-typed-array/.eslintrc +1 -0
  404. package/node_modules/which-typed-array/CHANGELOG.md +57 -0
  405. package/node_modules/which-typed-array/index.d.ts +62 -0
  406. package/node_modules/which-typed-array/index.js +50 -25
  407. package/node_modules/which-typed-array/package.json +28 -13
  408. package/node_modules/which-typed-array/test/index.js +7 -1
  409. package/node_modules/which-typed-array/tsconfig.json +9 -0
  410. package/package.json +2 -3
  411. package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/README.md +0 -214
  412. package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/lib/bn.js +0 -3547
  413. package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/package.json +0 -39
  414. package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/LICENSE +0 -21
  415. package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/README.md +0 -48
  416. package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/index.js +0 -138
  417. package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/package.json +0 -42
  418. package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/README.md +0 -48
  419. package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/index.js +0 -95
  420. package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/package.json +0 -41
  421. package/node_modules/available-typed-arrays/.eslintignore +0 -1
  422. package/node_modules/bn.js/CHANGELOG.md +0 -51
  423. package/node_modules/cipher-base/.npmignore +0 -1
  424. package/node_modules/cipher-base/.travis.yml +0 -6
  425. package/node_modules/cipher-base/test.js +0 -111
  426. package/node_modules/elliptic/node_modules/bn.js/README.md +0 -200
  427. package/node_modules/elliptic/node_modules/bn.js/lib/bn.js +0 -3446
  428. package/node_modules/elliptic/node_modules/bn.js/package.json +0 -36
  429. package/node_modules/elliptic/package.json +0 -56
  430. package/node_modules/for-each/.travis.yml +0 -45
  431. package/node_modules/for-each/test/.eslintrc +0 -8
  432. package/node_modules/has-proto/CHANGELOG.md +0 -23
  433. package/node_modules/has-proto/README.md +0 -38
  434. package/node_modules/has-proto/index.js +0 -11
  435. package/node_modules/has-proto/test/index.js +0 -19
  436. package/node_modules/hasown/index.d.ts.map +0 -1
  437. package/node_modules/is-arguments/.eslintignore +0 -1
  438. package/node_modules/is-generator-function/.eslintignore +0 -1
  439. package/node_modules/object-is/.eslintignore +0 -1
  440. package/node_modules/object.assign/test.html +0 -18458
  441. package/node_modules/parse-asn1/node_modules/hash-base/LICENSE +0 -21
  442. package/node_modules/parse-asn1/node_modules/hash-base/README.md +0 -48
  443. package/node_modules/parse-asn1/node_modules/hash-base/index.js +0 -95
  444. package/node_modules/parse-asn1/node_modules/hash-base/package.json +0 -41
  445. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/README.md +0 -0
  446. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/base.js +0 -0
  447. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/edwards.js +0 -0
  448. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/index.js +0 -0
  449. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/mont.js +0 -0
  450. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/short.js +0 -0
  451. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curves.js +0 -0
  452. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/index.js +0 -0
  453. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/key.js +0 -0
  454. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/signature.js +0 -0
  455. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/index.js +0 -0
  456. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/key.js +0 -0
  457. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/signature.js +0 -0
  458. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/precomputed/secp256k1.js +0 -0
  459. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/utils.js +0 -0
  460. /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
@@ -1,39 +0,0 @@
1
- {
2
- "name": "bn.js",
3
- "version": "5.2.1",
4
- "description": "Big number implementation in pure javascript",
5
- "keywords": [
6
- "BN",
7
- "Big number",
8
- "BigNum",
9
- "Modulo",
10
- "Montgomery"
11
- ],
12
- "homepage": "https://github.com/indutny/bn.js",
13
- "bugs": {
14
- "url": "https://github.com/indutny/bn.js/issues"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "git@github.com:indutny/bn.js"
19
- },
20
- "license": "MIT",
21
- "author": "Fedor Indutny <fedor@indutny.com>",
22
- "files": [
23
- "lib/bn.js"
24
- ],
25
- "main": "lib/bn.js",
26
- "browser": {
27
- "buffer": false
28
- },
29
- "scripts": {
30
- "lint": "standardx",
31
- "test": "npm run lint && npm run unit",
32
- "unit": "mocha --reporter=spec test/*-test.js"
33
- },
34
- "devDependencies": {
35
- "eslint-plugin-es5": "^1.5.0",
36
- "mocha": "^8.3.0",
37
- "standardx": "^7.0.0"
38
- }
39
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 Kirill Fomichev
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1,48 +0,0 @@
1
- # hash-base
2
-
3
- [![npm Package](https://img.shields.io/npm/v/hash-base.svg?style=flat-square)](https://www.npmjs.org/package/hash-base)
4
- [![Build Status](https://img.shields.io/travis/crypto-browserify/hash-base.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/hash-base)
5
- [![Dependency status](https://img.shields.io/david/crypto-browserify/hash-base.svg?style=flat-square)](https://david-dm.org/crypto-browserify/hash-base#info=dependencies)
6
-
7
- Abstract base class to inherit from if you want to create streams implementing the same API as node crypto [Hash][1] (for [Cipher][2] / [Decipher][3] check [crypto-browserify/cipher-base][4]).
8
-
9
- ## Example
10
-
11
- ```js
12
- const HashBase = require('hash-base');
13
- const inherits = require('inherits');
14
-
15
- // our hash function is XOR sum of all bytes
16
- function MyHash () {
17
- HashBase.call(this, 1); // in bytes
18
-
19
- this._sum = 0x00;
20
- };
21
-
22
- inherits(MyHash, HashBase)
23
-
24
- MyHash.prototype._update = function () {
25
- for (let i = 0; i < this._block.length; ++i) {
26
- this._sum ^= this._block[i];
27
- }
28
- };
29
-
30
- MyHash.prototype._digest = function () {
31
- return this._sum;
32
- };
33
-
34
- const data = Buffer.from([0x00, 0x42, 0x01]);
35
- const hash = new MyHash().update(data).digest();
36
- console.log(hash); // => 67
37
- ```
38
- You also can check [source code](index.js) or [crypto-browserify/md5.js][5]
39
-
40
- ## LICENSE
41
-
42
- MIT
43
-
44
- [1]: https://nodejs.org/api/crypto.html#crypto_class_hash
45
- [2]: https://nodejs.org/api/crypto.html#crypto_class_cipher
46
- [3]: https://nodejs.org/api/crypto.html#crypto_class_decipher
47
- [4]: https://github.com/crypto-browserify/cipher-base
48
- [5]: https://github.com/crypto-browserify/md5.js
@@ -1,138 +0,0 @@
1
- 'use strict'
2
- var Buffer = require('safe-buffer').Buffer
3
- var Transform = require('stream').Transform
4
- var inherits = require('inherits')
5
-
6
- function HashBase (blockSize) {
7
- Transform.call(this)
8
-
9
- this._block = Buffer.allocUnsafe(blockSize)
10
- this._blockSize = blockSize
11
- this._blockOffset = 0
12
- this._length = [0, 0, 0, 0]
13
-
14
- this._finalized = false
15
- }
16
-
17
- inherits(HashBase, Transform)
18
-
19
- HashBase.prototype._transform = function (chunk, encoding, callback) {
20
- var error = null
21
- try {
22
- this.update(chunk, encoding)
23
- } catch (err) {
24
- error = err
25
- }
26
-
27
- callback(error)
28
- }
29
-
30
- HashBase.prototype._flush = function (callback) {
31
- var error = null
32
- try {
33
- this.push(this.digest())
34
- } catch (err) {
35
- error = err
36
- }
37
-
38
- callback(error)
39
- }
40
-
41
- var useUint8Array = typeof Uint8Array !== 'undefined'
42
- var useArrayBuffer = typeof ArrayBuffer !== 'undefined' &&
43
- typeof Uint8Array !== 'undefined' &&
44
- ArrayBuffer.isView &&
45
- (Buffer.prototype instanceof Uint8Array || Buffer.TYPED_ARRAY_SUPPORT)
46
-
47
- function toBuffer (data, encoding) {
48
- // No need to do anything for exact instance
49
- // This is only valid when safe-buffer.Buffer === buffer.Buffer, i.e. when Buffer.from/Buffer.alloc existed
50
- if (data instanceof Buffer) return data
51
-
52
- // Convert strings to Buffer
53
- if (typeof data === 'string') return Buffer.from(data, encoding)
54
-
55
- /*
56
- * Wrap any TypedArray instances and DataViews
57
- * Makes sense only on engines with full TypedArray support -- let Buffer detect that
58
- */
59
- if (useArrayBuffer && ArrayBuffer.isView(data)) {
60
- if (data.byteLength === 0) return Buffer.alloc(0) // Bug in Node.js <6.3.1, which treats this as out-of-bounds
61
- var res = Buffer.from(data.buffer, data.byteOffset, data.byteLength)
62
- // Recheck result size, as offset/length doesn't work on Node.js <5.10
63
- // We just go to Uint8Array case if this fails
64
- if (res.byteLength === data.byteLength) return res
65
- }
66
-
67
- /*
68
- * Uint8Array in engines where Buffer.from might not work with ArrayBuffer, just copy over
69
- * Doesn't make sense with other TypedArray instances
70
- */
71
- if (useUint8Array && data instanceof Uint8Array) return Buffer.from(data)
72
-
73
- /*
74
- * Old Buffer polyfill on an engine that doesn't have TypedArray support
75
- * Also, this is from a different Buffer polyfill implementation then we have, as instanceof check failed
76
- * Convert to our current Buffer implementation
77
- */
78
- if (
79
- Buffer.isBuffer(data) &&
80
- data.constructor &&
81
- typeof data.constructor.isBuffer === 'function' &&
82
- data.constructor.isBuffer(data)
83
- ) {
84
- return Buffer.from(data)
85
- }
86
-
87
- throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')
88
- }
89
-
90
- HashBase.prototype.update = function (data, encoding) {
91
- if (this._finalized) throw new Error('Digest already called')
92
-
93
- data = toBuffer(data, encoding) // asserts correct input type
94
-
95
- // consume data
96
- var block = this._block
97
- var offset = 0
98
- while (this._blockOffset + data.length - offset >= this._blockSize) {
99
- for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
100
- this._update()
101
- this._blockOffset = 0
102
- }
103
- while (offset < data.length) block[this._blockOffset++] = data[offset++]
104
-
105
- // update length
106
- for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
107
- this._length[j] += carry
108
- carry = (this._length[j] / 0x0100000000) | 0
109
- if (carry > 0) this._length[j] -= 0x0100000000 * carry
110
- }
111
-
112
- return this
113
- }
114
-
115
- HashBase.prototype._update = function () {
116
- throw new Error('_update is not implemented')
117
- }
118
-
119
- HashBase.prototype.digest = function (encoding) {
120
- if (this._finalized) throw new Error('Digest already called')
121
- this._finalized = true
122
-
123
- var digest = this._digest()
124
- if (encoding !== undefined) digest = digest.toString(encoding)
125
-
126
- // reset state
127
- this._block.fill(0)
128
- this._blockOffset = 0
129
- for (var i = 0; i < 4; ++i) this._length[i] = 0
130
-
131
- return digest
132
- }
133
-
134
- HashBase.prototype._digest = function () {
135
- throw new Error('_digest is not implemented')
136
- }
137
-
138
- module.exports = HashBase
@@ -1,42 +0,0 @@
1
- {
2
- "name": "hash-base",
3
- "version": "3.0.5",
4
- "description": "abstract base class for hash-streams",
5
- "keywords": [
6
- "hash",
7
- "stream"
8
- ],
9
- "homepage": "https://github.com/crypto-browserify/hash-base",
10
- "bugs": {
11
- "url": "https://github.com/crypto-browserify/hash-base/issues"
12
- },
13
- "license": "MIT",
14
- "author": "Kirill Fomichev <fanatid@ya.ru> (https://github.com/fanatid)",
15
- "files": [
16
- "index.js"
17
- ],
18
- "main": "index.js",
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/crypto-browserify/hash-base.git"
22
- },
23
- "scripts": {
24
- "lint": "standard",
25
- "pretest": "npm run lint",
26
- "test": "npm run tests-only",
27
- "tests-only": "nyc tape 'test/**/*.js'",
28
- "posttest": "npx npm@'>=10.2' audit --production"
29
- },
30
- "dependencies": {
31
- "inherits": "^2.0.4",
32
- "safe-buffer": "^5.2.1"
33
- },
34
- "devDependencies": {
35
- "nyc": "^10.3.2",
36
- "standard": "^14.3.3",
37
- "tape": "^5.9.0"
38
- },
39
- "engines": {
40
- "node": ">= 0.10"
41
- }
42
- }
@@ -1,48 +0,0 @@
1
- # hash-base
2
-
3
- [![NPM Package](https://img.shields.io/npm/v/hash-base.svg?style=flat-square)](https://www.npmjs.org/package/hash-base)
4
- [![Build Status](https://img.shields.io/travis/crypto-browserify/hash-base.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/hash-base)
5
- [![Dependency status](https://img.shields.io/david/crypto-browserify/hash-base.svg?style=flat-square)](https://david-dm.org/crypto-browserify/hash-base#info=dependencies)
6
-
7
- [![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
8
-
9
- Abstract base class to inherit from if you want to create streams implementing the same API as node crypto [Hash][1] (for [Cipher][2] / [Decipher][3] check [crypto-browserify/cipher-base][4]).
10
-
11
- ## Example
12
-
13
- ```js
14
- const HashBase = require('hash-base')
15
- const inherits = require('inherits')
16
-
17
- // our hash function is XOR sum of all bytes
18
- function MyHash () {
19
- HashBase.call(this, 1) // in bytes
20
-
21
- this._sum = 0x00
22
- }
23
-
24
- inherits(MyHash, HashBase)
25
-
26
- MyHash.prototype._update = function () {
27
- for (let i = 0; i < this._block.length; ++i) this._sum ^= this._block[i]
28
- }
29
-
30
- MyHash.prototype._digest = function () {
31
- return this._sum
32
- }
33
-
34
- const data = Buffer.from([ 0x00, 0x42, 0x01 ])
35
- const hash = new MyHash().update(data).digest()
36
- console.log(hash) // => 67
37
- ```
38
- You also can check [source code](index.js) or [crypto-browserify/md5.js][5]
39
-
40
- ## LICENSE
41
-
42
- MIT
43
-
44
- [1]: https://nodejs.org/api/crypto.html#crypto_class_hash
45
- [2]: https://nodejs.org/api/crypto.html#crypto_class_cipher
46
- [3]: https://nodejs.org/api/crypto.html#crypto_class_decipher
47
- [4]: https://github.com/crypto-browserify/cipher-base
48
- [5]: https://github.com/crypto-browserify/md5.js
@@ -1,95 +0,0 @@
1
- 'use strict'
2
- var Buffer = require('safe-buffer').Buffer
3
- var Transform = require('stream').Transform
4
- var inherits = require('inherits')
5
-
6
- function throwIfNotStringOrBuffer (val, prefix) {
7
- if (!Buffer.isBuffer(val) && typeof val !== 'string') {
8
- throw new TypeError(prefix + ' must be a string or a buffer')
9
- }
10
- }
11
-
12
- function HashBase (blockSize) {
13
- Transform.call(this)
14
-
15
- this._block = Buffer.allocUnsafe(blockSize)
16
- this._blockSize = blockSize
17
- this._blockOffset = 0
18
- this._length = [0, 0, 0, 0]
19
-
20
- this._finalized = false
21
- }
22
-
23
- inherits(HashBase, Transform)
24
-
25
- HashBase.prototype._transform = function (chunk, encoding, callback) {
26
- var error = null
27
- try {
28
- this.update(chunk, encoding)
29
- } catch (err) {
30
- error = err
31
- }
32
-
33
- callback(error)
34
- }
35
-
36
- HashBase.prototype._flush = function (callback) {
37
- var error = null
38
- try {
39
- this.push(this.digest())
40
- } catch (err) {
41
- error = err
42
- }
43
-
44
- callback(error)
45
- }
46
-
47
- HashBase.prototype.update = function (data, encoding) {
48
- throwIfNotStringOrBuffer(data, 'Data')
49
- if (this._finalized) throw new Error('Digest already called')
50
- if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)
51
-
52
- // consume data
53
- var block = this._block
54
- var offset = 0
55
- while (this._blockOffset + data.length - offset >= this._blockSize) {
56
- for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
57
- this._update()
58
- this._blockOffset = 0
59
- }
60
- while (offset < data.length) block[this._blockOffset++] = data[offset++]
61
-
62
- // update length
63
- for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
64
- this._length[j] += carry
65
- carry = (this._length[j] / 0x0100000000) | 0
66
- if (carry > 0) this._length[j] -= 0x0100000000 * carry
67
- }
68
-
69
- return this
70
- }
71
-
72
- HashBase.prototype._update = function () {
73
- throw new Error('_update is not implemented')
74
- }
75
-
76
- HashBase.prototype.digest = function (encoding) {
77
- if (this._finalized) throw new Error('Digest already called')
78
- this._finalized = true
79
-
80
- var digest = this._digest()
81
- if (encoding !== undefined) digest = digest.toString(encoding)
82
-
83
- // reset state
84
- this._block.fill(0)
85
- this._blockOffset = 0
86
- for (var i = 0; i < 4; ++i) this._length[i] = 0
87
-
88
- return digest
89
- }
90
-
91
- HashBase.prototype._digest = function () {
92
- throw new Error('_digest is not implemented')
93
- }
94
-
95
- module.exports = HashBase
@@ -1,41 +0,0 @@
1
- {
2
- "name": "hash-base",
3
- "version": "3.0.4",
4
- "description": "abstract base class for hash-streams",
5
- "keywords": [
6
- "hash",
7
- "stream"
8
- ],
9
- "homepage": "https://github.com/crypto-browserify/hash-base",
10
- "bugs": {
11
- "url": "https://github.com/crypto-browserify/hash-base/issues"
12
- },
13
- "license": "MIT",
14
- "author": "Kirill Fomichev <fanatid@ya.ru> (https://github.com/fanatid)",
15
- "files": [
16
- "index.js"
17
- ],
18
- "main": "index.js",
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/crypto-browserify/hash-base.git"
22
- },
23
- "scripts": {
24
- "coverage": "nyc node test/*.js",
25
- "lint": "standard",
26
- "test": "npm run lint && npm run unit",
27
- "unit": "node test/*.js"
28
- },
29
- "dependencies": {
30
- "inherits": "^2.0.1",
31
- "safe-buffer": "^5.0.1"
32
- },
33
- "devDependencies": {
34
- "nyc": "^8.3.2",
35
- "standard": "*",
36
- "tape": "^4.2.0"
37
- },
38
- "engines": {
39
- "node": ">=4"
40
- }
41
- }
@@ -1 +0,0 @@
1
- coverage/
@@ -1,51 +0,0 @@
1
- 5.2.0 / 2021-02-23
2
- ------------------
3
-
4
- - fix: Buffer not using global in browser (#260)
5
- - Fix LE constructor for HEX (#265)
6
-
7
- 5.1.3 / 2020-08-14
8
- ------------------
9
-
10
- - Add support for defined but not implemented Symbol.for (#252)
11
-
12
- 5.1.2 / 2020-05-20
13
- ------------------
14
-
15
- - Fix BN v5/v4 interoperability issue (#249)
16
-
17
- 5.1.1 / 2019-12-24
18
- ------------------
19
-
20
- - Temporary workaround for BN#_move (#236)
21
- - Add eslintrc instead config in package.json (#237)
22
-
23
- 5.1.0 / 2019-12-23
24
- ------------------
25
-
26
- - Benchmark for BigInt (#226)
27
- - Add documentation for max/min (#232)
28
- - Update BN#inspect for Symbols (#225)
29
- - Improve performance of toArrayLike (#222)
30
- - temporary disable jumboMulTo in BN#mulTo (#221)
31
- - optimize toBitArray function (#212)
32
- - fix iaddn sign issue (#216)
33
-
34
- 5.0.0 / 2019-07-04
35
- ------------------
36
-
37
- - travis: update node versions (#205)
38
- - Refactor buffer constructor (#200)
39
- - lib: fix for negative numbers: imuln, modrn, idivn (#185)
40
- - bn: fix Red#imod (#178)
41
- - check unexpected high bits for invalid characters (#173)
42
- - document support very large integers (#158)
43
- - only define toBuffer if Buffer is defined (#172)
44
- - lib: better validation of string input (#151)
45
- - tests: reject decimal input in constructor (#91)
46
- - bn: make .strip() an internal method (#105)
47
- - lib: deprecate `.modn()` introduce `.modrn()` (#112 #129 #130)
48
- - bn: don't accept invalid characters (#141)
49
- - package: use `files` insteadof `.npmignore` (#152)
50
- - bn: improve allocation speed for buffers (#167)
51
- - toJSON to default to interoperable hex (length % 2) (#164)
@@ -1 +0,0 @@
1
- node_modules
@@ -1,6 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - "0.11"
4
- - "0.10"
5
- - "0.12"
6
- - "iojs"
@@ -1,111 +0,0 @@
1
- var Buffer = require('safe-buffer').Buffer
2
- var CipherBase = require('./')
3
-
4
- var test = require('tape')
5
- var inherits = require('inherits')
6
-
7
- test('basic version', function (t) {
8
- function Cipher () {
9
- CipherBase.call(this)
10
- }
11
- inherits(Cipher, CipherBase)
12
- Cipher.prototype._update = function (input) {
13
- t.ok(Buffer.isBuffer(input))
14
- return input
15
- }
16
- Cipher.prototype._final = function () {
17
- // noop
18
- }
19
- var cipher = new Cipher()
20
- var utf8 = 'abc123abcd'
21
- var update = cipher.update(utf8, 'utf8', 'base64') + cipher.final('base64')
22
- var string = (Buffer.from(update, 'base64')).toString()
23
- t.equals(utf8, string)
24
- t.end()
25
- })
26
- test('hash mode', function (t) {
27
- function Cipher () {
28
- CipherBase.call(this, 'finalName')
29
- this._cache = []
30
- }
31
- inherits(Cipher, CipherBase)
32
- Cipher.prototype._update = function (input) {
33
- t.ok(Buffer.isBuffer(input))
34
- this._cache.push(input)
35
- }
36
- Cipher.prototype._final = function () {
37
- return Buffer.concat(this._cache)
38
- }
39
- var cipher = new Cipher()
40
- var utf8 = 'abc123abcd'
41
- var update = cipher.update(utf8, 'utf8').finalName('base64')
42
- var string = (Buffer.from(update, 'base64')).toString()
43
-
44
- t.equals(utf8, string)
45
- t.end()
46
- })
47
- test('hash mode as stream', function (t) {
48
- function Cipher () {
49
- CipherBase.call(this, 'finalName')
50
- this._cache = []
51
- }
52
- inherits(Cipher, CipherBase)
53
- Cipher.prototype._update = function (input) {
54
- t.ok(Buffer.isBuffer(input))
55
- this._cache.push(input)
56
- }
57
- Cipher.prototype._final = function () {
58
- return Buffer.concat(this._cache)
59
- }
60
- var cipher = new Cipher()
61
- cipher.on('error', function (e) {
62
- t.notOk(e)
63
- })
64
- var utf8 = 'abc123abcd'
65
- cipher.end(utf8, 'utf8')
66
- var update = cipher.read().toString('base64')
67
- var string = (Buffer.from(update, 'base64')).toString()
68
-
69
- t.equals(utf8, string)
70
- t.end()
71
- })
72
-
73
- test('encodings', function (t) {
74
- inherits(Cipher, CipherBase)
75
- function Cipher () {
76
- CipherBase.call(this)
77
- }
78
- Cipher.prototype._update = function (input) {
79
- return input
80
- }
81
- Cipher.prototype._final = function () {
82
- // noop
83
- }
84
- t.test('mix and match encoding', function (t) {
85
- t.plan(2)
86
-
87
- var cipher = new Cipher()
88
- cipher.update('foo', 'utf8', 'utf8')
89
- t.throws(function () {
90
- cipher.update('foo', 'utf8', 'base64')
91
- })
92
- cipher = new Cipher()
93
- cipher.update('foo', 'utf8', 'base64')
94
- t.doesNotThrow(function () {
95
- cipher.update('foo', 'utf8')
96
- cipher.final('base64')
97
- })
98
- })
99
- t.test('handle long uft8 plaintexts', function (t) {
100
- t.plan(1)
101
- var txt = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん'
102
-
103
- var cipher = new Cipher()
104
- var decipher = new Cipher()
105
- var enc = decipher.update(cipher.update(txt, 'utf8', 'base64'), 'base64', 'utf8')
106
- enc += decipher.update(cipher.final('base64'), 'base64', 'utf8')
107
- enc += decipher.final('utf8')
108
-
109
- t.equals(txt, enc)
110
- })
111
- })