@blockcast/mmt-container 0.3.0 → 0.4.0-main.1e94b11199ea

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 (606) hide show
  1. package/README.md +33 -16
  2. package/dist/browser-runtime.js +14816 -14254
  3. package/dist/browser-runtime.js.map +4 -4
  4. package/dist/carp-catalog.d.ts +24 -19
  5. package/dist/carp-catalog.d.ts.map +1 -1
  6. package/dist/carp-catalog.js +32 -14
  7. package/dist/carp-catalog.js.map +4 -4
  8. package/dist/catalog-fec-params.d.ts +88 -28
  9. package/dist/catalog-fec-params.d.ts.map +1 -1
  10. package/dist/catalog-fec-params.js +60 -23
  11. package/dist/catalog-fec-params.js.map +4 -4
  12. package/dist/catalog-network-source.js +1 -7
  13. package/dist/catalog-network-source.js.map +4 -4
  14. package/dist/cmaf-block-assembler.d.ts +0 -2
  15. package/dist/cmaf-block-assembler.d.ts.map +1 -1
  16. package/dist/cmaf-block-assembler.js +0 -1
  17. package/dist/cmaf-block-assembler.js.map +2 -2
  18. package/dist/cmcd-producer.d.ts.map +1 -1
  19. package/dist/cmcd-producer.js +0 -4
  20. package/dist/cmcd-producer.js.map +2 -2
  21. package/dist/delivery-catalog.d.ts +124 -0
  22. package/dist/delivery-catalog.d.ts.map +1 -0
  23. package/dist/delivery-catalog.js +1857 -0
  24. package/dist/delivery-catalog.js.map +7 -0
  25. package/dist/delta-fallback-config.d.ts +42 -0
  26. package/dist/delta-fallback-config.d.ts.map +1 -0
  27. package/dist/delta-fallback-config.js +59 -0
  28. package/dist/delta-fallback-config.js.map +7 -0
  29. package/dist/fec-manager.d.ts +52 -30
  30. package/dist/fec-manager.d.ts.map +1 -1
  31. package/dist/fec-manager.js +338 -293
  32. package/dist/fec-manager.js.map +4 -4
  33. package/dist/fec-state.d.ts +19 -31
  34. package/dist/fec-state.d.ts.map +1 -1
  35. package/dist/fec-state.js +4 -10
  36. package/dist/fec-state.js.map +4 -4
  37. package/dist/fec-worker-setup.d.ts +18 -14
  38. package/dist/fec-worker-setup.d.ts.map +1 -1
  39. package/dist/fec-worker-setup.js +81 -96
  40. package/dist/fec-worker-setup.js.map +4 -4
  41. package/dist/index.d.ts +5 -3
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +16 -0
  44. package/dist/index.js.map +2 -2
  45. package/dist/iso-block-locator.js +1 -7
  46. package/dist/iso-block-locator.js.map +4 -4
  47. package/dist/media-router.d.ts +20 -8
  48. package/dist/media-router.d.ts.map +1 -1
  49. package/dist/media-router.js +46 -21
  50. package/dist/media-router.js.map +2 -2
  51. package/dist/mfu-reassembler.js +24 -30
  52. package/dist/mfu-reassembler.js.map +4 -4
  53. package/dist/mmtp-container-parser.d.ts +14 -11
  54. package/dist/mmtp-container-parser.d.ts.map +1 -1
  55. package/dist/mmtp-container-parser.js +126 -99
  56. package/dist/mmtp-container-parser.js.map +4 -4
  57. package/dist/mmtp-container-parser.no-modules.js +154 -108
  58. package/dist/mmtp-container-parser.no-modules.js.map +4 -4
  59. package/dist/mmtp-decode-pipeline.js +126 -99
  60. package/dist/mmtp-decode-pipeline.js.map +4 -4
  61. package/dist/mmtp-router.d.ts +51 -29
  62. package/dist/mmtp-router.d.ts.map +1 -1
  63. package/dist/mmtp-router.js +260 -326
  64. package/dist/mmtp-router.js.map +4 -4
  65. package/dist/multicast-input.js +1 -7
  66. package/dist/multicast-input.js.map +4 -4
  67. package/dist/multicast-manager.d.ts +72 -6
  68. package/dist/multicast-manager.d.ts.map +1 -1
  69. package/dist/multicast-manager.js +882 -673
  70. package/dist/multicast-manager.js.map +4 -4
  71. package/dist/multicast-transport.d.ts +1 -1
  72. package/dist/multicast-transport.d.ts.map +1 -1
  73. package/dist/multicast-transport.js +44 -26
  74. package/dist/multicast-transport.js.map +4 -4
  75. package/dist/multicast-unwrap.js +29 -35
  76. package/dist/multicast-unwrap.js.map +4 -4
  77. package/dist/no-modules.js +150 -106
  78. package/dist/no-modules.js.map +4 -4
  79. package/dist/repair-fetch.d.ts +116 -21
  80. package/dist/repair-fetch.d.ts.map +1 -1
  81. package/dist/repair-fetch.js +114 -34
  82. package/dist/repair-fetch.js.map +4 -4
  83. package/dist/repair-layers.d.ts +18 -7
  84. package/dist/repair-layers.d.ts.map +1 -1
  85. package/dist/repair-layers.js +12 -10
  86. package/dist/repair-layers.js.map +4 -4
  87. package/dist/signaling.js +2 -11
  88. package/dist/signaling.js.map +4 -4
  89. package/dist/timestamp-codec.js +24 -30
  90. package/dist/timestamp-codec.js.map +4 -4
  91. package/dist/track-session.d.ts +7 -0
  92. package/dist/track-session.d.ts.map +1 -1
  93. package/dist/track-session.js +15 -8
  94. package/dist/track-session.js.map +2 -2
  95. package/dist/wasm-mfu-reassembler.js +1 -7
  96. package/dist/wasm-mfu-reassembler.js.map +4 -4
  97. package/dist/wasm-mmtp-container-parser.js +126 -99
  98. package/dist/wasm-mmtp-container-parser.js.map +4 -4
  99. package/package.json +7 -14
  100. package/schemas/catalog.schema.json +3 -3
  101. package/src/carp-catalog.ts +51 -24
  102. package/src/catalog-fec-params.ts +173 -64
  103. package/src/cmaf-block-assembler.ts +1 -4
  104. package/src/cmcd-producer.ts +0 -6
  105. package/src/delivery-catalog.ts +498 -0
  106. package/src/delta-fallback-config.ts +72 -0
  107. package/src/fec-manager.ts +457 -334
  108. package/src/fec-state.ts +20 -32
  109. package/src/fec-worker-setup.ts +109 -90
  110. package/src/index.ts +32 -0
  111. package/src/media-router.ts +59 -21
  112. package/src/mmtp-container-parser.ts +106 -20
  113. package/src/mmtp-router.ts +189 -330
  114. package/src/multicast-manager.ts +265 -86
  115. package/src/multicast-transport.ts +16 -9
  116. package/src/repair-fetch.ts +273 -43
  117. package/src/repair-layers.ts +28 -8
  118. package/src/track-session.ts +28 -9
  119. package/test-vectors/catalog/README.md +44 -18
  120. package/test-vectors/catalog/negative/fec-block-profile-retired.json +52 -0
  121. package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +1 -1
  122. package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +1 -1
  123. package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +1 -1
  124. package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +1 -1
  125. package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +1 -1
  126. package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +1 -1
  127. package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +1 -1
  128. package/test-vectors/catalog/negative/multicast-endpoint-relay-address.json +39 -0
  129. package/test-vectors/catalog/negative/multicast-network-source-empty.json +1 -1
  130. package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +1 -1
  131. package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +2 -1
  132. package/test-vectors/catalog/positive/fec-layered-repair.json +2 -2
  133. package/test-vectors/catalog/positive/fec-multicast.json +2 -1
  134. package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +38 -0
  135. package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +2 -1
  136. package/test-vectors/catalog/section-codes.json +33 -0
  137. package/test-vectors/catalog-timing.json +356 -0
  138. package/test-vectors/catalog-validation.json +40 -5
  139. package/test-vectors/delivery-catalog/README.md +11 -0
  140. package/test-vectors/delivery-catalog/negative/missing-block-profile.json +58 -0
  141. package/test-vectors/delivery-catalog/negative/packet-id-signaling.json +59 -0
  142. package/test-vectors/delivery-catalog/negative/retired-k-padded-block-profile.json +59 -0
  143. package/test-vectors/delivery-catalog/positive/dash.json +56 -0
  144. package/test-vectors/delivery-catalog/positive/mmtp-source-only.json +43 -0
  145. package/node_modules/@blockcast/fec-worker/README.md +0 -223
  146. package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
  147. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +0 -38
  148. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +0 -1
  149. package/node_modules/@blockcast/fec-worker/dist/block-order.js +0 -78
  150. package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +0 -1
  151. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +0 -93
  152. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +0 -1
  153. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +0 -346
  154. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +0 -1
  155. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +0 -380
  156. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +0 -1
  157. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +0 -11
  158. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +0 -1
  159. package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +0 -14
  160. package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +0 -1
  161. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +0 -859
  162. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +0 -7
  163. package/node_modules/@blockcast/fec-worker/dist/index.d.ts +0 -10
  164. package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +0 -1
  165. package/node_modules/@blockcast/fec-worker/dist/index.js +0 -8
  166. package/node_modules/@blockcast/fec-worker/dist/index.js.map +0 -1
  167. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +0 -20
  168. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +0 -1
  169. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +0 -370
  170. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +0 -7
  171. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +0 -104
  172. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +0 -1
  173. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +0 -181
  174. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +0 -1
  175. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +0 -194
  176. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +0 -1
  177. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +0 -62
  178. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +0 -1
  179. package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +0 -9
  180. package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +0 -1
  181. package/node_modules/@blockcast/fec-worker/dist/transfer.js +0 -13
  182. package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +0 -1
  183. package/node_modules/@blockcast/fec-worker/package.json +0 -59
  184. package/node_modules/@blockcast/fec-worker/src/block-order.ts +0 -93
  185. package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +0 -392
  186. package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +0 -399
  187. package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +0 -1502
  188. package/node_modules/@blockcast/fec-worker/src/index.ts +0 -35
  189. package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +0 -589
  190. package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +0 -222
  191. package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +0 -209
  192. package/node_modules/@blockcast/fec-worker/src/transfer.ts +0 -12
  193. package/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
  194. package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  195. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
  196. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
  197. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
  198. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
  199. package/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
  200. package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
  201. package/node_modules/@blockcast/mmt-base/README.md +0 -134
  202. package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  203. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
  204. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
  205. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
  206. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
  207. package/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
  208. package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
  209. package/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
  210. package/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
  211. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
  212. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
  213. package/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
  214. package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
  215. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
  216. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
  217. package/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
  218. package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
  219. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
  220. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
  221. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
  222. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
  223. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
  224. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
  225. package/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
  226. package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
  227. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
  228. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
  229. package/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
  230. package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
  231. package/node_modules/@blockcast/mmt-base/package.json +0 -49
  232. package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
  233. package/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
  234. package/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
  235. package/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
  236. package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
  237. package/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
  238. package/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
  239. package/node_modules/@blockcast/mmt-fec/README.md +0 -271
  240. package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
  241. package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +0 -82
  242. package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +0 -1
  243. package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +0 -296
  244. package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +0 -1
  245. package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +0 -106
  246. package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +0 -1
  247. package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +0 -288
  248. package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +0 -1
  249. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +0 -46
  250. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +0 -1
  251. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +0 -96
  252. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +0 -1
  253. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +0 -33
  254. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +0 -1
  255. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +0 -57
  256. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +0 -1
  257. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +0 -205
  258. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +0 -1
  259. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +0 -240
  260. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +0 -1
  261. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +0 -28
  262. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +0 -1
  263. package/node_modules/@blockcast/mmt-fec/dist/index.js +0 -28
  264. package/node_modules/@blockcast/mmt-fec/dist/index.js.map +0 -1
  265. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +0 -20
  266. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +0 -1
  267. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +0 -28
  268. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +0 -1
  269. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +0 -258
  270. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +0 -1
  271. package/node_modules/@blockcast/mmt-fec/dist/oti.js +0 -382
  272. package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +0 -1
  273. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +0 -41
  274. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +0 -1
  275. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +0 -81
  276. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +0 -1
  277. package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +0 -82
  278. package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +0 -1
  279. package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +0 -170
  280. package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +0 -1
  281. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
  282. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  283. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
  284. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
  285. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
  286. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
  287. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
  288. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
  289. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +0 -134
  290. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  291. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
  292. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
  293. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
  294. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
  295. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
  296. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
  297. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
  298. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
  299. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
  300. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
  301. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
  302. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
  303. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
  304. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
  305. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
  306. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
  307. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
  308. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
  309. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
  310. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
  311. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
  312. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
  313. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
  314. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
  315. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
  316. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
  317. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
  318. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
  319. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +0 -49
  320. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
  321. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
  322. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
  323. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
  324. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
  325. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
  326. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
  327. package/node_modules/@blockcast/mmt-fec/package.json +0 -79
  328. package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +0 -371
  329. package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +0 -439
  330. package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +0 -127
  331. package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +0 -68
  332. package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +0 -310
  333. package/node_modules/@blockcast/mmt-fec/src/index.ts +0 -94
  334. package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +0 -34
  335. package/node_modules/@blockcast/mmt-fec/src/oti.ts +0 -463
  336. package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +0 -101
  337. package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +0 -195
  338. package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
  339. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +0 -28
  340. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +0 -1
  341. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +0 -128
  342. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +0 -1
  343. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +0 -4
  344. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +0 -1
  345. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +0 -4
  346. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +0 -1
  347. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +0 -37
  348. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +0 -1
  349. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +0 -179
  350. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +0 -1
  351. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +0 -99
  352. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +0 -1
  353. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +0 -492
  354. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +0 -1
  355. package/node_modules/@blockcast/mmt-manifest-verify/package.json +0 -45
  356. package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +0 -171
  357. package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +0 -3
  358. package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +0 -230
  359. package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +0 -669
  360. package/node_modules/@noble/hashes/LICENSE +0 -21
  361. package/node_modules/@noble/hashes/README.md +0 -521
  362. package/node_modules/@noble/hashes/_assert.d.ts +0 -17
  363. package/node_modules/@noble/hashes/_assert.d.ts.map +0 -1
  364. package/node_modules/@noble/hashes/_assert.js +0 -18
  365. package/node_modules/@noble/hashes/_assert.js.map +0 -1
  366. package/node_modules/@noble/hashes/_blake.d.ts +0 -14
  367. package/node_modules/@noble/hashes/_blake.d.ts.map +0 -1
  368. package/node_modules/@noble/hashes/_blake.js +0 -50
  369. package/node_modules/@noble/hashes/_blake.js.map +0 -1
  370. package/node_modules/@noble/hashes/_md.d.ts +0 -51
  371. package/node_modules/@noble/hashes/_md.d.ts.map +0 -1
  372. package/node_modules/@noble/hashes/_md.js +0 -162
  373. package/node_modules/@noble/hashes/_md.js.map +0 -1
  374. package/node_modules/@noble/hashes/_u64.d.ts +0 -55
  375. package/node_modules/@noble/hashes/_u64.d.ts.map +0 -1
  376. package/node_modules/@noble/hashes/_u64.js +0 -90
  377. package/node_modules/@noble/hashes/_u64.js.map +0 -1
  378. package/node_modules/@noble/hashes/argon2.d.ts +0 -32
  379. package/node_modules/@noble/hashes/argon2.d.ts.map +0 -1
  380. package/node_modules/@noble/hashes/argon2.js +0 -401
  381. package/node_modules/@noble/hashes/argon2.js.map +0 -1
  382. package/node_modules/@noble/hashes/blake1.d.ts +0 -106
  383. package/node_modules/@noble/hashes/blake1.d.ts.map +0 -1
  384. package/node_modules/@noble/hashes/blake1.js +0 -459
  385. package/node_modules/@noble/hashes/blake1.js.map +0 -1
  386. package/node_modules/@noble/hashes/blake2.d.ts +0 -116
  387. package/node_modules/@noble/hashes/blake2.d.ts.map +0 -1
  388. package/node_modules/@noble/hashes/blake2.js +0 -420
  389. package/node_modules/@noble/hashes/blake2.js.map +0 -1
  390. package/node_modules/@noble/hashes/blake2b.d.ts +0 -11
  391. package/node_modules/@noble/hashes/blake2b.d.ts.map +0 -1
  392. package/node_modules/@noble/hashes/blake2b.js +0 -14
  393. package/node_modules/@noble/hashes/blake2b.js.map +0 -1
  394. package/node_modules/@noble/hashes/blake2s.d.ts +0 -20
  395. package/node_modules/@noble/hashes/blake2s.d.ts.map +0 -1
  396. package/node_modules/@noble/hashes/blake2s.js +0 -24
  397. package/node_modules/@noble/hashes/blake2s.js.map +0 -1
  398. package/node_modules/@noble/hashes/blake3.d.ts +0 -54
  399. package/node_modules/@noble/hashes/blake3.d.ts.map +0 -1
  400. package/node_modules/@noble/hashes/blake3.js +0 -255
  401. package/node_modules/@noble/hashes/blake3.js.map +0 -1
  402. package/node_modules/@noble/hashes/crypto.d.ts +0 -2
  403. package/node_modules/@noble/hashes/crypto.d.ts.map +0 -1
  404. package/node_modules/@noble/hashes/crypto.js +0 -5
  405. package/node_modules/@noble/hashes/crypto.js.map +0 -1
  406. package/node_modules/@noble/hashes/cryptoNode.d.ts +0 -2
  407. package/node_modules/@noble/hashes/cryptoNode.d.ts.map +0 -1
  408. package/node_modules/@noble/hashes/cryptoNode.js +0 -18
  409. package/node_modules/@noble/hashes/cryptoNode.js.map +0 -1
  410. package/node_modules/@noble/hashes/eskdf.d.ts +0 -47
  411. package/node_modules/@noble/hashes/eskdf.d.ts.map +0 -1
  412. package/node_modules/@noble/hashes/eskdf.js +0 -166
  413. package/node_modules/@noble/hashes/eskdf.js.map +0 -1
  414. package/node_modules/@noble/hashes/esm/_assert.d.ts +0 -17
  415. package/node_modules/@noble/hashes/esm/_assert.d.ts.map +0 -1
  416. package/node_modules/@noble/hashes/esm/_assert.js +0 -15
  417. package/node_modules/@noble/hashes/esm/_assert.js.map +0 -1
  418. package/node_modules/@noble/hashes/esm/_blake.d.ts +0 -14
  419. package/node_modules/@noble/hashes/esm/_blake.d.ts.map +0 -1
  420. package/node_modules/@noble/hashes/esm/_blake.js +0 -45
  421. package/node_modules/@noble/hashes/esm/_blake.js.map +0 -1
  422. package/node_modules/@noble/hashes/esm/_md.d.ts +0 -51
  423. package/node_modules/@noble/hashes/esm/_md.d.ts.map +0 -1
  424. package/node_modules/@noble/hashes/esm/_md.js +0 -155
  425. package/node_modules/@noble/hashes/esm/_md.js.map +0 -1
  426. package/node_modules/@noble/hashes/esm/_u64.d.ts +0 -55
  427. package/node_modules/@noble/hashes/esm/_u64.d.ts.map +0 -1
  428. package/node_modules/@noble/hashes/esm/_u64.js +0 -67
  429. package/node_modules/@noble/hashes/esm/_u64.js.map +0 -1
  430. package/node_modules/@noble/hashes/esm/argon2.d.ts +0 -32
  431. package/node_modules/@noble/hashes/esm/argon2.d.ts.map +0 -1
  432. package/node_modules/@noble/hashes/esm/argon2.js +0 -392
  433. package/node_modules/@noble/hashes/esm/argon2.js.map +0 -1
  434. package/node_modules/@noble/hashes/esm/blake1.d.ts +0 -106
  435. package/node_modules/@noble/hashes/esm/blake1.d.ts.map +0 -1
  436. package/node_modules/@noble/hashes/esm/blake1.js +0 -452
  437. package/node_modules/@noble/hashes/esm/blake1.js.map +0 -1
  438. package/node_modules/@noble/hashes/esm/blake2.d.ts +0 -116
  439. package/node_modules/@noble/hashes/esm/blake2.d.ts.map +0 -1
  440. package/node_modules/@noble/hashes/esm/blake2.js +0 -413
  441. package/node_modules/@noble/hashes/esm/blake2.js.map +0 -1
  442. package/node_modules/@noble/hashes/esm/blake2b.d.ts +0 -11
  443. package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +0 -1
  444. package/node_modules/@noble/hashes/esm/blake2b.js +0 -11
  445. package/node_modules/@noble/hashes/esm/blake2b.js.map +0 -1
  446. package/node_modules/@noble/hashes/esm/blake2s.d.ts +0 -20
  447. package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +0 -1
  448. package/node_modules/@noble/hashes/esm/blake2s.js +0 -21
  449. package/node_modules/@noble/hashes/esm/blake2s.js.map +0 -1
  450. package/node_modules/@noble/hashes/esm/blake3.d.ts +0 -54
  451. package/node_modules/@noble/hashes/esm/blake3.d.ts.map +0 -1
  452. package/node_modules/@noble/hashes/esm/blake3.js +0 -251
  453. package/node_modules/@noble/hashes/esm/blake3.js.map +0 -1
  454. package/node_modules/@noble/hashes/esm/crypto.d.ts +0 -2
  455. package/node_modules/@noble/hashes/esm/crypto.d.ts.map +0 -1
  456. package/node_modules/@noble/hashes/esm/crypto.js +0 -2
  457. package/node_modules/@noble/hashes/esm/crypto.js.map +0 -1
  458. package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +0 -2
  459. package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +0 -1
  460. package/node_modules/@noble/hashes/esm/cryptoNode.js +0 -15
  461. package/node_modules/@noble/hashes/esm/cryptoNode.js.map +0 -1
  462. package/node_modules/@noble/hashes/esm/eskdf.d.ts +0 -47
  463. package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +0 -1
  464. package/node_modules/@noble/hashes/esm/eskdf.js +0 -160
  465. package/node_modules/@noble/hashes/esm/eskdf.js.map +0 -1
  466. package/node_modules/@noble/hashes/esm/hkdf.d.ts +0 -36
  467. package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +0 -1
  468. package/node_modules/@noble/hashes/esm/hkdf.js +0 -82
  469. package/node_modules/@noble/hashes/esm/hkdf.js.map +0 -1
  470. package/node_modules/@noble/hashes/esm/hmac.d.ts +0 -35
  471. package/node_modules/@noble/hashes/esm/hmac.d.ts.map +0 -1
  472. package/node_modules/@noble/hashes/esm/hmac.js +0 -86
  473. package/node_modules/@noble/hashes/esm/hmac.js.map +0 -1
  474. package/node_modules/@noble/hashes/esm/index.d.ts +0 -2
  475. package/node_modules/@noble/hashes/esm/index.d.ts.map +0 -1
  476. package/node_modules/@noble/hashes/esm/index.js +0 -33
  477. package/node_modules/@noble/hashes/esm/index.js.map +0 -1
  478. package/node_modules/@noble/hashes/esm/legacy.d.ts +0 -71
  479. package/node_modules/@noble/hashes/esm/legacy.d.ts.map +0 -1
  480. package/node_modules/@noble/hashes/esm/legacy.js +0 -281
  481. package/node_modules/@noble/hashes/esm/legacy.js.map +0 -1
  482. package/node_modules/@noble/hashes/esm/package.json +0 -10
  483. package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +0 -23
  484. package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +0 -1
  485. package/node_modules/@noble/hashes/esm/pbkdf2.js +0 -97
  486. package/node_modules/@noble/hashes/esm/pbkdf2.js.map +0 -1
  487. package/node_modules/@noble/hashes/esm/ripemd160.d.ts +0 -13
  488. package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +0 -1
  489. package/node_modules/@noble/hashes/esm/ripemd160.js +0 -13
  490. package/node_modules/@noble/hashes/esm/ripemd160.js.map +0 -1
  491. package/node_modules/@noble/hashes/esm/scrypt.d.ts +0 -34
  492. package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +0 -1
  493. package/node_modules/@noble/hashes/esm/scrypt.js +0 -228
  494. package/node_modules/@noble/hashes/esm/scrypt.js.map +0 -1
  495. package/node_modules/@noble/hashes/esm/sha1.d.ts +0 -11
  496. package/node_modules/@noble/hashes/esm/sha1.d.ts.map +0 -1
  497. package/node_modules/@noble/hashes/esm/sha1.js +0 -11
  498. package/node_modules/@noble/hashes/esm/sha1.js.map +0 -1
  499. package/node_modules/@noble/hashes/esm/sha2.d.ts +0 -159
  500. package/node_modules/@noble/hashes/esm/sha2.d.ts.map +0 -1
  501. package/node_modules/@noble/hashes/esm/sha2.js +0 -375
  502. package/node_modules/@noble/hashes/esm/sha2.js.map +0 -1
  503. package/node_modules/@noble/hashes/esm/sha256.d.ts +0 -20
  504. package/node_modules/@noble/hashes/esm/sha256.d.ts.map +0 -1
  505. package/node_modules/@noble/hashes/esm/sha256.js +0 -20
  506. package/node_modules/@noble/hashes/esm/sha256.js.map +0 -1
  507. package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +0 -142
  508. package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +0 -1
  509. package/node_modules/@noble/hashes/esm/sha3-addons.js +0 -393
  510. package/node_modules/@noble/hashes/esm/sha3-addons.js.map +0 -1
  511. package/node_modules/@noble/hashes/esm/sha3.d.ts +0 -53
  512. package/node_modules/@noble/hashes/esm/sha3.d.ts.map +0 -1
  513. package/node_modules/@noble/hashes/esm/sha3.js +0 -234
  514. package/node_modules/@noble/hashes/esm/sha3.js.map +0 -1
  515. package/node_modules/@noble/hashes/esm/sha512.d.ts +0 -26
  516. package/node_modules/@noble/hashes/esm/sha512.d.ts.map +0 -1
  517. package/node_modules/@noble/hashes/esm/sha512.js +0 -26
  518. package/node_modules/@noble/hashes/esm/sha512.js.map +0 -1
  519. package/node_modules/@noble/hashes/esm/utils.d.ts +0 -161
  520. package/node_modules/@noble/hashes/esm/utils.d.ts.map +0 -1
  521. package/node_modules/@noble/hashes/esm/utils.js +0 -281
  522. package/node_modules/@noble/hashes/esm/utils.js.map +0 -1
  523. package/node_modules/@noble/hashes/hkdf.d.ts +0 -36
  524. package/node_modules/@noble/hashes/hkdf.d.ts.map +0 -1
  525. package/node_modules/@noble/hashes/hkdf.js +0 -88
  526. package/node_modules/@noble/hashes/hkdf.js.map +0 -1
  527. package/node_modules/@noble/hashes/hmac.d.ts +0 -35
  528. package/node_modules/@noble/hashes/hmac.d.ts.map +0 -1
  529. package/node_modules/@noble/hashes/hmac.js +0 -91
  530. package/node_modules/@noble/hashes/hmac.js.map +0 -1
  531. package/node_modules/@noble/hashes/index.d.ts +0 -1
  532. package/node_modules/@noble/hashes/index.d.ts.map +0 -1
  533. package/node_modules/@noble/hashes/index.js +0 -33
  534. package/node_modules/@noble/hashes/index.js.map +0 -1
  535. package/node_modules/@noble/hashes/legacy.d.ts +0 -71
  536. package/node_modules/@noble/hashes/legacy.d.ts.map +0 -1
  537. package/node_modules/@noble/hashes/legacy.js +0 -287
  538. package/node_modules/@noble/hashes/legacy.js.map +0 -1
  539. package/node_modules/@noble/hashes/package.json +0 -266
  540. package/node_modules/@noble/hashes/pbkdf2.d.ts +0 -23
  541. package/node_modules/@noble/hashes/pbkdf2.d.ts.map +0 -1
  542. package/node_modules/@noble/hashes/pbkdf2.js +0 -101
  543. package/node_modules/@noble/hashes/pbkdf2.js.map +0 -1
  544. package/node_modules/@noble/hashes/ripemd160.d.ts +0 -13
  545. package/node_modules/@noble/hashes/ripemd160.d.ts.map +0 -1
  546. package/node_modules/@noble/hashes/ripemd160.js +0 -16
  547. package/node_modules/@noble/hashes/ripemd160.js.map +0 -1
  548. package/node_modules/@noble/hashes/scrypt.d.ts +0 -34
  549. package/node_modules/@noble/hashes/scrypt.d.ts.map +0 -1
  550. package/node_modules/@noble/hashes/scrypt.js +0 -232
  551. package/node_modules/@noble/hashes/scrypt.js.map +0 -1
  552. package/node_modules/@noble/hashes/sha1.d.ts +0 -11
  553. package/node_modules/@noble/hashes/sha1.d.ts.map +0 -1
  554. package/node_modules/@noble/hashes/sha1.js +0 -14
  555. package/node_modules/@noble/hashes/sha1.js.map +0 -1
  556. package/node_modules/@noble/hashes/sha2.d.ts +0 -159
  557. package/node_modules/@noble/hashes/sha2.d.ts.map +0 -1
  558. package/node_modules/@noble/hashes/sha2.js +0 -384
  559. package/node_modules/@noble/hashes/sha2.js.map +0 -1
  560. package/node_modules/@noble/hashes/sha256.d.ts +0 -20
  561. package/node_modules/@noble/hashes/sha256.d.ts.map +0 -1
  562. package/node_modules/@noble/hashes/sha256.js +0 -23
  563. package/node_modules/@noble/hashes/sha256.js.map +0 -1
  564. package/node_modules/@noble/hashes/sha3-addons.d.ts +0 -142
  565. package/node_modules/@noble/hashes/sha3-addons.d.ts.map +0 -1
  566. package/node_modules/@noble/hashes/sha3-addons.js +0 -402
  567. package/node_modules/@noble/hashes/sha3-addons.js.map +0 -1
  568. package/node_modules/@noble/hashes/sha3.d.ts +0 -53
  569. package/node_modules/@noble/hashes/sha3.d.ts.map +0 -1
  570. package/node_modules/@noble/hashes/sha3.js +0 -239
  571. package/node_modules/@noble/hashes/sha3.js.map +0 -1
  572. package/node_modules/@noble/hashes/sha512.d.ts +0 -26
  573. package/node_modules/@noble/hashes/sha512.d.ts.map +0 -1
  574. package/node_modules/@noble/hashes/sha512.js +0 -29
  575. package/node_modules/@noble/hashes/sha512.js.map +0 -1
  576. package/node_modules/@noble/hashes/src/_assert.ts +0 -22
  577. package/node_modules/@noble/hashes/src/_blake.ts +0 -50
  578. package/node_modules/@noble/hashes/src/_md.ts +0 -176
  579. package/node_modules/@noble/hashes/src/_u64.ts +0 -91
  580. package/node_modules/@noble/hashes/src/argon2.ts +0 -497
  581. package/node_modules/@noble/hashes/src/blake1.ts +0 -534
  582. package/node_modules/@noble/hashes/src/blake2.ts +0 -486
  583. package/node_modules/@noble/hashes/src/blake2b.ts +0 -10
  584. package/node_modules/@noble/hashes/src/blake2s.ts +0 -20
  585. package/node_modules/@noble/hashes/src/blake3.ts +0 -272
  586. package/node_modules/@noble/hashes/src/crypto.ts +0 -9
  587. package/node_modules/@noble/hashes/src/cryptoNode.ts +0 -15
  588. package/node_modules/@noble/hashes/src/eskdf.ts +0 -187
  589. package/node_modules/@noble/hashes/src/hkdf.ts +0 -88
  590. package/node_modules/@noble/hashes/src/hmac.ts +0 -94
  591. package/node_modules/@noble/hashes/src/index.ts +0 -31
  592. package/node_modules/@noble/hashes/src/legacy.ts +0 -293
  593. package/node_modules/@noble/hashes/src/pbkdf2.ts +0 -122
  594. package/node_modules/@noble/hashes/src/ripemd160.ts +0 -12
  595. package/node_modules/@noble/hashes/src/scrypt.ts +0 -257
  596. package/node_modules/@noble/hashes/src/sha1.ts +0 -10
  597. package/node_modules/@noble/hashes/src/sha2.ts +0 -402
  598. package/node_modules/@noble/hashes/src/sha256.ts +0 -24
  599. package/node_modules/@noble/hashes/src/sha3-addons.ts +0 -499
  600. package/node_modules/@noble/hashes/src/sha3.ts +0 -258
  601. package/node_modules/@noble/hashes/src/sha512.ts +0 -34
  602. package/node_modules/@noble/hashes/src/utils.ts +0 -395
  603. package/node_modules/@noble/hashes/utils.d.ts +0 -161
  604. package/node_modules/@noble/hashes/utils.d.ts.map +0 -1
  605. package/node_modules/@noble/hashes/utils.js +0 -313
  606. package/node_modules/@noble/hashes/utils.js.map +0 -1
@@ -1,257 +0,0 @@
1
- /**
2
- * RFC 7914 Scrypt KDF. Can be used to create a key from password and salt.
3
- * @module
4
- */
5
- import { pbkdf2 } from './pbkdf2.ts';
6
- import { sha256 } from './sha2.ts';
7
- // prettier-ignore
8
- import {
9
- anumber, asyncLoop,
10
- checkOpts, clean,
11
- type KDFInput, rotl,
12
- swap32IfBE,
13
- u32
14
- } from './utils.ts';
15
-
16
- // The main Scrypt loop: uses Salsa extensively.
17
- // Six versions of the function were tried, this is the fastest one.
18
- // prettier-ignore
19
- function XorAndSalsa(
20
- prev: Uint32Array,
21
- pi: number,
22
- input: Uint32Array,
23
- ii: number,
24
- out: Uint32Array,
25
- oi: number
26
- ) {
27
- // Based on https://cr.yp.to/salsa20.html
28
- // Xor blocks
29
- let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];
30
- let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];
31
- let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];
32
- let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];
33
- let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];
34
- let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];
35
- let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];
36
- let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];
37
- // Save state to temporary variables (salsa)
38
- let x00 = y00, x01 = y01, x02 = y02, x03 = y03,
39
- x04 = y04, x05 = y05, x06 = y06, x07 = y07,
40
- x08 = y08, x09 = y09, x10 = y10, x11 = y11,
41
- x12 = y12, x13 = y13, x14 = y14, x15 = y15;
42
- // Main loop (salsa)
43
- for (let i = 0; i < 8; i += 2) {
44
- x04 ^= rotl(x00 + x12 | 0, 7); x08 ^= rotl(x04 + x00 | 0, 9);
45
- x12 ^= rotl(x08 + x04 | 0, 13); x00 ^= rotl(x12 + x08 | 0, 18);
46
- x09 ^= rotl(x05 + x01 | 0, 7); x13 ^= rotl(x09 + x05 | 0, 9);
47
- x01 ^= rotl(x13 + x09 | 0, 13); x05 ^= rotl(x01 + x13 | 0, 18);
48
- x14 ^= rotl(x10 + x06 | 0, 7); x02 ^= rotl(x14 + x10 | 0, 9);
49
- x06 ^= rotl(x02 + x14 | 0, 13); x10 ^= rotl(x06 + x02 | 0, 18);
50
- x03 ^= rotl(x15 + x11 | 0, 7); x07 ^= rotl(x03 + x15 | 0, 9);
51
- x11 ^= rotl(x07 + x03 | 0, 13); x15 ^= rotl(x11 + x07 | 0, 18);
52
- x01 ^= rotl(x00 + x03 | 0, 7); x02 ^= rotl(x01 + x00 | 0, 9);
53
- x03 ^= rotl(x02 + x01 | 0, 13); x00 ^= rotl(x03 + x02 | 0, 18);
54
- x06 ^= rotl(x05 + x04 | 0, 7); x07 ^= rotl(x06 + x05 | 0, 9);
55
- x04 ^= rotl(x07 + x06 | 0, 13); x05 ^= rotl(x04 + x07 | 0, 18);
56
- x11 ^= rotl(x10 + x09 | 0, 7); x08 ^= rotl(x11 + x10 | 0, 9);
57
- x09 ^= rotl(x08 + x11 | 0, 13); x10 ^= rotl(x09 + x08 | 0, 18);
58
- x12 ^= rotl(x15 + x14 | 0, 7); x13 ^= rotl(x12 + x15 | 0, 9);
59
- x14 ^= rotl(x13 + x12 | 0, 13); x15 ^= rotl(x14 + x13 | 0, 18);
60
- }
61
- // Write output (salsa)
62
- out[oi++] = (y00 + x00) | 0; out[oi++] = (y01 + x01) | 0;
63
- out[oi++] = (y02 + x02) | 0; out[oi++] = (y03 + x03) | 0;
64
- out[oi++] = (y04 + x04) | 0; out[oi++] = (y05 + x05) | 0;
65
- out[oi++] = (y06 + x06) | 0; out[oi++] = (y07 + x07) | 0;
66
- out[oi++] = (y08 + x08) | 0; out[oi++] = (y09 + x09) | 0;
67
- out[oi++] = (y10 + x10) | 0; out[oi++] = (y11 + x11) | 0;
68
- out[oi++] = (y12 + x12) | 0; out[oi++] = (y13 + x13) | 0;
69
- out[oi++] = (y14 + x14) | 0; out[oi++] = (y15 + x15) | 0;
70
- }
71
-
72
- function BlockMix(input: Uint32Array, ii: number, out: Uint32Array, oi: number, r: number) {
73
- // The block B is r 128-byte chunks (which is equivalent of 2r 64-byte chunks)
74
- let head = oi + 0;
75
- let tail = oi + 16 * r;
76
- for (let i = 0; i < 16; i++) out[tail + i] = input[ii + (2 * r - 1) * 16 + i]; // X ← B[2r−1]
77
- for (let i = 0; i < r; i++, head += 16, ii += 16) {
78
- // We write odd & even Yi at same time. Even: 0bXXXXX0 Odd: 0bXXXXX1
79
- XorAndSalsa(out, tail, input, ii, out, head); // head[i] = Salsa(blockIn[2*i] ^ tail[i-1])
80
- if (i > 0) tail += 16; // First iteration overwrites tmp value in tail
81
- XorAndSalsa(out, head, input, (ii += 16), out, tail); // tail[i] = Salsa(blockIn[2*i+1] ^ head[i])
82
- }
83
- }
84
-
85
- export type ScryptOpts = {
86
- N: number; // cost factor
87
- r: number; // block size
88
- p: number; // parallelization
89
- dkLen?: number; // key length
90
- asyncTick?: number; // block execution max time
91
- maxmem?: number;
92
- onProgress?: (progress: number) => void;
93
- };
94
-
95
- // Common prologue and epilogue for sync/async functions
96
- function scryptInit(password: KDFInput, salt: KDFInput, _opts?: ScryptOpts) {
97
- // Maxmem - 1GB+1KB by default
98
- const opts = checkOpts(
99
- {
100
- dkLen: 32,
101
- asyncTick: 10,
102
- maxmem: 1024 ** 3 + 1024,
103
- },
104
- _opts
105
- );
106
- const { N, r, p, dkLen, asyncTick, maxmem, onProgress } = opts;
107
- anumber(N);
108
- anumber(r);
109
- anumber(p);
110
- anumber(dkLen);
111
- anumber(asyncTick);
112
- anumber(maxmem);
113
- if (onProgress !== undefined && typeof onProgress !== 'function')
114
- throw new Error('progressCb should be function');
115
- const blockSize = 128 * r;
116
- const blockSize32 = blockSize / 4;
117
-
118
- // Max N is 2^32 (Integrify is 32-bit). Real limit is 2^22: JS engines Uint8Array limit is 4GB in 2024.
119
- // Spec check `N >= 2^(blockSize / 8)` is not done for compat with popular libs,
120
- // which used incorrect r: 1, p: 8. Also, the check seems to be a spec error:
121
- // https://www.rfc-editor.org/errata_search.php?rfc=7914
122
- const pow32 = Math.pow(2, 32);
123
- if (N <= 1 || (N & (N - 1)) !== 0 || N > pow32) {
124
- throw new Error('Scrypt: N must be larger than 1, a power of 2, and less than 2^32');
125
- }
126
- if (p < 0 || p > ((pow32 - 1) * 32) / blockSize) {
127
- throw new Error(
128
- 'Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)'
129
- );
130
- }
131
- if (dkLen < 0 || dkLen > (pow32 - 1) * 32) {
132
- throw new Error(
133
- 'Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32'
134
- );
135
- }
136
- const memUsed = blockSize * (N + p);
137
- if (memUsed > maxmem) {
138
- throw new Error(
139
- 'Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of ' + maxmem
140
- );
141
- }
142
- // [B0...Bp−1] ← PBKDF2HMAC-SHA256(Passphrase, Salt, 1, blockSize*ParallelizationFactor)
143
- // Since it has only one iteration there is no reason to use async variant
144
- const B = pbkdf2(sha256, password, salt, { c: 1, dkLen: blockSize * p });
145
- const B32 = u32(B);
146
- // Re-used between parallel iterations. Array(iterations) of B
147
- const V = u32(new Uint8Array(blockSize * N));
148
- const tmp = u32(new Uint8Array(blockSize));
149
- let blockMixCb = () => {};
150
- if (onProgress) {
151
- const totalBlockMix = 2 * N * p;
152
- // Invoke callback if progress changes from 10.01 to 10.02
153
- // Allows to draw smooth progress bar on up to 8K screen
154
- const callbackPer = Math.max(Math.floor(totalBlockMix / 10000), 1);
155
- let blockMixCnt = 0;
156
- blockMixCb = () => {
157
- blockMixCnt++;
158
- if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))
159
- onProgress(blockMixCnt / totalBlockMix);
160
- };
161
- }
162
- return { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick };
163
- }
164
-
165
- function scryptOutput(
166
- password: KDFInput,
167
- dkLen: number,
168
- B: Uint8Array,
169
- V: Uint32Array,
170
- tmp: Uint32Array
171
- ) {
172
- const res = pbkdf2(sha256, password, B, { c: 1, dkLen });
173
- clean(B, V, tmp);
174
- return res;
175
- }
176
-
177
- /**
178
- * Scrypt KDF from RFC 7914.
179
- * @param password - pass
180
- * @param salt - salt
181
- * @param opts - parameters
182
- * - `N` is cpu/mem work factor (power of 2 e.g. 2**18)
183
- * - `r` is block size (8 is common), fine-tunes sequential memory read size and performance
184
- * - `p` is parallelization factor (1 is common)
185
- * - `dkLen` is output key length in bytes e.g. 32.
186
- * - `asyncTick` - (default: 10) max time in ms for which async function can block execution
187
- * - `maxmem` - (default: `1024 ** 3 + 1024` aka 1GB+1KB). A limit that the app could use for scrypt
188
- * - `onProgress` - callback function that would be executed for progress report
189
- * @returns Derived key
190
- * @example
191
- * scrypt('password', 'salt', { N: 2**18, r: 8, p: 1, dkLen: 32 });
192
- */
193
- export function scrypt(password: KDFInput, salt: KDFInput, opts: ScryptOpts): Uint8Array {
194
- const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb } = scryptInit(
195
- password,
196
- salt,
197
- opts
198
- );
199
- swap32IfBE(B32);
200
- for (let pi = 0; pi < p; pi++) {
201
- const Pi = blockSize32 * pi;
202
- for (let i = 0; i < blockSize32; i++) V[i] = B32[Pi + i]; // V[0] = B[i]
203
- for (let i = 0, pos = 0; i < N - 1; i++) {
204
- BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);
205
- blockMixCb();
206
- }
207
- BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element
208
- blockMixCb();
209
- for (let i = 0; i < N; i++) {
210
- // First u32 of the last 64-byte block (u32 is LE)
211
- const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations
212
- for (let k = 0; k < blockSize32; k++) tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]
213
- BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])
214
- blockMixCb();
215
- }
216
- }
217
- swap32IfBE(B32);
218
- return scryptOutput(password, dkLen, B, V, tmp);
219
- }
220
-
221
- /**
222
- * Scrypt KDF from RFC 7914. Async version.
223
- * @example
224
- * await scryptAsync('password', 'salt', { N: 2**18, r: 8, p: 1, dkLen: 32 });
225
- */
226
- export async function scryptAsync(
227
- password: KDFInput,
228
- salt: KDFInput,
229
- opts: ScryptOpts
230
- ): Promise<Uint8Array> {
231
- const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick } = scryptInit(
232
- password,
233
- salt,
234
- opts
235
- );
236
- swap32IfBE(B32);
237
- for (let pi = 0; pi < p; pi++) {
238
- const Pi = blockSize32 * pi;
239
- for (let i = 0; i < blockSize32; i++) V[i] = B32[Pi + i]; // V[0] = B[i]
240
- let pos = 0;
241
- await asyncLoop(N - 1, asyncTick, () => {
242
- BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);
243
- blockMixCb();
244
- });
245
- BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element
246
- blockMixCb();
247
- await asyncLoop(N, asyncTick, () => {
248
- // First u32 of the last 64-byte block (u32 is LE)
249
- const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations
250
- for (let k = 0; k < blockSize32; k++) tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]
251
- BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])
252
- blockMixCb();
253
- });
254
- }
255
- swap32IfBE(B32);
256
- return scryptOutput(password, dkLen, B, V, tmp);
257
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * SHA1 (RFC 3174) legacy hash function.
3
- * @module
4
- * @deprecated
5
- */
6
- import { SHA1 as SHA1n, sha1 as sha1n } from './legacy.ts';
7
- /** @deprecated Use import from `noble/hashes/legacy` module */
8
- export const SHA1: typeof SHA1n = SHA1n;
9
- /** @deprecated Use import from `noble/hashes/legacy` module */
10
- export const sha1: typeof sha1n = sha1n;
@@ -1,402 +0,0 @@
1
- /**
2
- * SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.
3
- * SHA256 is the fastest hash implementable in JS, even faster than Blake3.
4
- * Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
5
- * [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).
6
- * @module
7
- */
8
- import { Chi, HashMD, Maj, SHA224_IV, SHA256_IV, SHA384_IV, SHA512_IV } from './_md.ts';
9
- import * as u64 from './_u64.ts';
10
- import { type CHash, clean, createHasher, rotr } from './utils.ts';
11
-
12
- /**
13
- * Round constants:
14
- * First 32 bits of fractional parts of the cube roots of the first 64 primes 2..311)
15
- */
16
- // prettier-ignore
17
- const SHA256_K = /* @__PURE__ */ Uint32Array.from([
18
- 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
19
- 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
20
- 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
21
- 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
22
- 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
23
- 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
24
- 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
25
- 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
26
- ]);
27
-
28
- /** Reusable temporary buffer. "W" comes straight from spec. */
29
- const SHA256_W = /* @__PURE__ */ new Uint32Array(64);
30
- export class SHA256 extends HashMD<SHA256> {
31
- // We cannot use array here since array allows indexing by variable
32
- // which means optimizer/compiler cannot use registers.
33
- protected A: number = SHA256_IV[0] | 0;
34
- protected B: number = SHA256_IV[1] | 0;
35
- protected C: number = SHA256_IV[2] | 0;
36
- protected D: number = SHA256_IV[3] | 0;
37
- protected E: number = SHA256_IV[4] | 0;
38
- protected F: number = SHA256_IV[5] | 0;
39
- protected G: number = SHA256_IV[6] | 0;
40
- protected H: number = SHA256_IV[7] | 0;
41
-
42
- constructor(outputLen: number = 32) {
43
- super(64, outputLen, 8, false);
44
- }
45
- protected get(): [number, number, number, number, number, number, number, number] {
46
- const { A, B, C, D, E, F, G, H } = this;
47
- return [A, B, C, D, E, F, G, H];
48
- }
49
- // prettier-ignore
50
- protected set(
51
- A: number, B: number, C: number, D: number, E: number, F: number, G: number, H: number
52
- ): void {
53
- this.A = A | 0;
54
- this.B = B | 0;
55
- this.C = C | 0;
56
- this.D = D | 0;
57
- this.E = E | 0;
58
- this.F = F | 0;
59
- this.G = G | 0;
60
- this.H = H | 0;
61
- }
62
- protected process(view: DataView, offset: number): void {
63
- // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array
64
- for (let i = 0; i < 16; i++, offset += 4) SHA256_W[i] = view.getUint32(offset, false);
65
- for (let i = 16; i < 64; i++) {
66
- const W15 = SHA256_W[i - 15];
67
- const W2 = SHA256_W[i - 2];
68
- const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);
69
- const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);
70
- SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;
71
- }
72
- // Compression function main loop, 64 rounds
73
- let { A, B, C, D, E, F, G, H } = this;
74
- for (let i = 0; i < 64; i++) {
75
- const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);
76
- const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
77
- const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);
78
- const T2 = (sigma0 + Maj(A, B, C)) | 0;
79
- H = G;
80
- G = F;
81
- F = E;
82
- E = (D + T1) | 0;
83
- D = C;
84
- C = B;
85
- B = A;
86
- A = (T1 + T2) | 0;
87
- }
88
- // Add the compressed chunk to the current hash value
89
- A = (A + this.A) | 0;
90
- B = (B + this.B) | 0;
91
- C = (C + this.C) | 0;
92
- D = (D + this.D) | 0;
93
- E = (E + this.E) | 0;
94
- F = (F + this.F) | 0;
95
- G = (G + this.G) | 0;
96
- H = (H + this.H) | 0;
97
- this.set(A, B, C, D, E, F, G, H);
98
- }
99
- protected roundClean(): void {
100
- clean(SHA256_W);
101
- }
102
- destroy(): void {
103
- this.set(0, 0, 0, 0, 0, 0, 0, 0);
104
- clean(this.buffer);
105
- }
106
- }
107
-
108
- export class SHA224 extends SHA256 {
109
- protected A: number = SHA224_IV[0] | 0;
110
- protected B: number = SHA224_IV[1] | 0;
111
- protected C: number = SHA224_IV[2] | 0;
112
- protected D: number = SHA224_IV[3] | 0;
113
- protected E: number = SHA224_IV[4] | 0;
114
- protected F: number = SHA224_IV[5] | 0;
115
- protected G: number = SHA224_IV[6] | 0;
116
- protected H: number = SHA224_IV[7] | 0;
117
- constructor() {
118
- super(28);
119
- }
120
- }
121
-
122
- // SHA2-512 is slower than sha256 in js because u64 operations are slow.
123
-
124
- // Round contants
125
- // First 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409
126
- // prettier-ignore
127
- const K512 = /* @__PURE__ */ (() => u64.split([
128
- '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',
129
- '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',
130
- '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',
131
- '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',
132
- '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',
133
- '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',
134
- '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',
135
- '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',
136
- '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',
137
- '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',
138
- '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',
139
- '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',
140
- '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',
141
- '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',
142
- '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',
143
- '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',
144
- '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',
145
- '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',
146
- '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',
147
- '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'
148
- ].map(n => BigInt(n))))();
149
- const SHA512_Kh = /* @__PURE__ */ (() => K512[0])();
150
- const SHA512_Kl = /* @__PURE__ */ (() => K512[1])();
151
-
152
- // Reusable temporary buffers
153
- const SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
154
- const SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
155
-
156
- export class SHA512 extends HashMD<SHA512> {
157
- // We cannot use array here since array allows indexing by variable
158
- // which means optimizer/compiler cannot use registers.
159
- // h -- high 32 bits, l -- low 32 bits
160
- protected Ah: number = SHA512_IV[0] | 0;
161
- protected Al: number = SHA512_IV[1] | 0;
162
- protected Bh: number = SHA512_IV[2] | 0;
163
- protected Bl: number = SHA512_IV[3] | 0;
164
- protected Ch: number = SHA512_IV[4] | 0;
165
- protected Cl: number = SHA512_IV[5] | 0;
166
- protected Dh: number = SHA512_IV[6] | 0;
167
- protected Dl: number = SHA512_IV[7] | 0;
168
- protected Eh: number = SHA512_IV[8] | 0;
169
- protected El: number = SHA512_IV[9] | 0;
170
- protected Fh: number = SHA512_IV[10] | 0;
171
- protected Fl: number = SHA512_IV[11] | 0;
172
- protected Gh: number = SHA512_IV[12] | 0;
173
- protected Gl: number = SHA512_IV[13] | 0;
174
- protected Hh: number = SHA512_IV[14] | 0;
175
- protected Hl: number = SHA512_IV[15] | 0;
176
-
177
- constructor(outputLen: number = 64) {
178
- super(128, outputLen, 16, false);
179
- }
180
- // prettier-ignore
181
- protected get(): [
182
- number, number, number, number, number, number, number, number,
183
- number, number, number, number, number, number, number, number
184
- ] {
185
- const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
186
- return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
187
- }
188
- // prettier-ignore
189
- protected set(
190
- Ah: number, Al: number, Bh: number, Bl: number, Ch: number, Cl: number, Dh: number, Dl: number,
191
- Eh: number, El: number, Fh: number, Fl: number, Gh: number, Gl: number, Hh: number, Hl: number
192
- ): void {
193
- this.Ah = Ah | 0;
194
- this.Al = Al | 0;
195
- this.Bh = Bh | 0;
196
- this.Bl = Bl | 0;
197
- this.Ch = Ch | 0;
198
- this.Cl = Cl | 0;
199
- this.Dh = Dh | 0;
200
- this.Dl = Dl | 0;
201
- this.Eh = Eh | 0;
202
- this.El = El | 0;
203
- this.Fh = Fh | 0;
204
- this.Fl = Fl | 0;
205
- this.Gh = Gh | 0;
206
- this.Gl = Gl | 0;
207
- this.Hh = Hh | 0;
208
- this.Hl = Hl | 0;
209
- }
210
- protected process(view: DataView, offset: number): void {
211
- // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array
212
- for (let i = 0; i < 16; i++, offset += 4) {
213
- SHA512_W_H[i] = view.getUint32(offset);
214
- SHA512_W_L[i] = view.getUint32((offset += 4));
215
- }
216
- for (let i = 16; i < 80; i++) {
217
- // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)
218
- const W15h = SHA512_W_H[i - 15] | 0;
219
- const W15l = SHA512_W_L[i - 15] | 0;
220
- const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);
221
- const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);
222
- // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)
223
- const W2h = SHA512_W_H[i - 2] | 0;
224
- const W2l = SHA512_W_L[i - 2] | 0;
225
- const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);
226
- const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);
227
- // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];
228
- const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
229
- const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
230
- SHA512_W_H[i] = SUMh | 0;
231
- SHA512_W_L[i] = SUMl | 0;
232
- }
233
- let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
234
- // Compression function main loop, 80 rounds
235
- for (let i = 0; i < 80; i++) {
236
- // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)
237
- const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);
238
- const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);
239
- //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
240
- const CHIh = (Eh & Fh) ^ (~Eh & Gh);
241
- const CHIl = (El & Fl) ^ (~El & Gl);
242
- // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]
243
- // prettier-ignore
244
- const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
245
- const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
246
- const T1l = T1ll | 0;
247
- // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)
248
- const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);
249
- const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);
250
- const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);
251
- const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);
252
- Hh = Gh | 0;
253
- Hl = Gl | 0;
254
- Gh = Fh | 0;
255
- Gl = Fl | 0;
256
- Fh = Eh | 0;
257
- Fl = El | 0;
258
- ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
259
- Dh = Ch | 0;
260
- Dl = Cl | 0;
261
- Ch = Bh | 0;
262
- Cl = Bl | 0;
263
- Bh = Ah | 0;
264
- Bl = Al | 0;
265
- const All = u64.add3L(T1l, sigma0l, MAJl);
266
- Ah = u64.add3H(All, T1h, sigma0h, MAJh);
267
- Al = All | 0;
268
- }
269
- // Add the compressed chunk to the current hash value
270
- ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
271
- ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
272
- ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
273
- ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
274
- ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
275
- ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
276
- ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
277
- ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
278
- this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
279
- }
280
- protected roundClean(): void {
281
- clean(SHA512_W_H, SHA512_W_L);
282
- }
283
- destroy(): void {
284
- clean(this.buffer);
285
- this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
286
- }
287
- }
288
-
289
- export class SHA384 extends SHA512 {
290
- protected Ah: number = SHA384_IV[0] | 0;
291
- protected Al: number = SHA384_IV[1] | 0;
292
- protected Bh: number = SHA384_IV[2] | 0;
293
- protected Bl: number = SHA384_IV[3] | 0;
294
- protected Ch: number = SHA384_IV[4] | 0;
295
- protected Cl: number = SHA384_IV[5] | 0;
296
- protected Dh: number = SHA384_IV[6] | 0;
297
- protected Dl: number = SHA384_IV[7] | 0;
298
- protected Eh: number = SHA384_IV[8] | 0;
299
- protected El: number = SHA384_IV[9] | 0;
300
- protected Fh: number = SHA384_IV[10] | 0;
301
- protected Fl: number = SHA384_IV[11] | 0;
302
- protected Gh: number = SHA384_IV[12] | 0;
303
- protected Gl: number = SHA384_IV[13] | 0;
304
- protected Hh: number = SHA384_IV[14] | 0;
305
- protected Hl: number = SHA384_IV[15] | 0;
306
-
307
- constructor() {
308
- super(48);
309
- }
310
- }
311
-
312
- /**
313
- * Truncated SHA512/256 and SHA512/224.
314
- * SHA512_IV is XORed with 0xa5a5a5a5a5a5a5a5, then used as "intermediary" IV of SHA512/t.
315
- * Then t hashes string to produce result IV.
316
- * See `test/misc/sha2-gen-iv.js`.
317
- */
318
-
319
- /** SHA512/224 IV */
320
- const T224_IV = /* @__PURE__ */ Uint32Array.from([
321
- 0x8c3d37c8, 0x19544da2, 0x73e19966, 0x89dcd4d6, 0x1dfab7ae, 0x32ff9c82, 0x679dd514, 0x582f9fcf,
322
- 0x0f6d2b69, 0x7bd44da8, 0x77e36f73, 0x04c48942, 0x3f9d85a8, 0x6a1d36c8, 0x1112e6ad, 0x91d692a1,
323
- ]);
324
-
325
- /** SHA512/256 IV */
326
- const T256_IV = /* @__PURE__ */ Uint32Array.from([
327
- 0x22312194, 0xfc2bf72c, 0x9f555fa3, 0xc84c64c2, 0x2393b86b, 0x6f53b151, 0x96387719, 0x5940eabd,
328
- 0x96283ee2, 0xa88effe3, 0xbe5e1e25, 0x53863992, 0x2b0199fc, 0x2c85b8aa, 0x0eb72ddc, 0x81c52ca2,
329
- ]);
330
-
331
- export class SHA512_224 extends SHA512 {
332
- protected Ah: number = T224_IV[0] | 0;
333
- protected Al: number = T224_IV[1] | 0;
334
- protected Bh: number = T224_IV[2] | 0;
335
- protected Bl: number = T224_IV[3] | 0;
336
- protected Ch: number = T224_IV[4] | 0;
337
- protected Cl: number = T224_IV[5] | 0;
338
- protected Dh: number = T224_IV[6] | 0;
339
- protected Dl: number = T224_IV[7] | 0;
340
- protected Eh: number = T224_IV[8] | 0;
341
- protected El: number = T224_IV[9] | 0;
342
- protected Fh: number = T224_IV[10] | 0;
343
- protected Fl: number = T224_IV[11] | 0;
344
- protected Gh: number = T224_IV[12] | 0;
345
- protected Gl: number = T224_IV[13] | 0;
346
- protected Hh: number = T224_IV[14] | 0;
347
- protected Hl: number = T224_IV[15] | 0;
348
-
349
- constructor() {
350
- super(28);
351
- }
352
- }
353
-
354
- export class SHA512_256 extends SHA512 {
355
- protected Ah: number = T256_IV[0] | 0;
356
- protected Al: number = T256_IV[1] | 0;
357
- protected Bh: number = T256_IV[2] | 0;
358
- protected Bl: number = T256_IV[3] | 0;
359
- protected Ch: number = T256_IV[4] | 0;
360
- protected Cl: number = T256_IV[5] | 0;
361
- protected Dh: number = T256_IV[6] | 0;
362
- protected Dl: number = T256_IV[7] | 0;
363
- protected Eh: number = T256_IV[8] | 0;
364
- protected El: number = T256_IV[9] | 0;
365
- protected Fh: number = T256_IV[10] | 0;
366
- protected Fl: number = T256_IV[11] | 0;
367
- protected Gh: number = T256_IV[12] | 0;
368
- protected Gl: number = T256_IV[13] | 0;
369
- protected Hh: number = T256_IV[14] | 0;
370
- protected Hl: number = T256_IV[15] | 0;
371
-
372
- constructor() {
373
- super(32);
374
- }
375
- }
376
-
377
- /**
378
- * SHA2-256 hash function from RFC 4634.
379
- *
380
- * It is the fastest JS hash, even faster than Blake3.
381
- * To break sha256 using birthday attack, attackers need to try 2^128 hashes.
382
- * BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.
383
- */
384
- export const sha256: CHash = /* @__PURE__ */ createHasher(() => new SHA256());
385
- /** SHA2-224 hash function from RFC 4634 */
386
- export const sha224: CHash = /* @__PURE__ */ createHasher(() => new SHA224());
387
-
388
- /** SHA2-512 hash function from RFC 4634. */
389
- export const sha512: CHash = /* @__PURE__ */ createHasher(() => new SHA512());
390
- /** SHA2-384 hash function from RFC 4634. */
391
- export const sha384: CHash = /* @__PURE__ */ createHasher(() => new SHA384());
392
-
393
- /**
394
- * SHA2-512/256 "truncated" hash function, with improved resistance to length extension attacks.
395
- * See the paper on [truncated SHA512](https://eprint.iacr.org/2010/548.pdf).
396
- */
397
- export const sha512_256: CHash = /* @__PURE__ */ createHasher(() => new SHA512_256());
398
- /**
399
- * SHA2-512/224 "truncated" hash function, with improved resistance to length extension attacks.
400
- * See the paper on [truncated SHA512](https://eprint.iacr.org/2010/548.pdf).
401
- */
402
- export const sha512_224: CHash = /* @__PURE__ */ createHasher(() => new SHA512_224());