From 49002e15cfc5e4e7304d52f3af15a18c2ecd0818 Mon Sep 17 00:00:00 2001 From: Zach Bowden Date: Wed, 29 Apr 2026 20:52:00 +0000 Subject: [PATCH 1/4] Fix all zeros after 16384 bytes with Blake3 (#2351) Co-authored-by: GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> (added test) --- package-lock.json | 8 +------- package.json | 2 +- src/core/operations/BLAKE3.mjs | 20 +++++++++++++------- tests/operations/tests/BLAKE3.mjs | 18 ++++++++++++++++++ 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39ab47c3..2e1958ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@alexaltea/capstone-js": "^3.0.5", "@astronautlabs/amf": "^0.0.6", "@blu3r4y/lzma": "^2.3.3", + "@noble/hashes": "2.2.0", "@wavesenterprise/crypto-gost-js": "^2.1.0-RC1", "@xmldom/xmldom": "^0.8.13", "argon2-browser": "^1.18.0", @@ -49,7 +50,6 @@ "flat": "^6.0.1", "geodesy": "1.1.3", "handlebars": "^4.7.9", - "hash-wasm": "^4.12.0", "highlight.js": "^11.11.1", "ieee754": "^1.2.1", "jimp": "1.6.0", @@ -11018,12 +11018,6 @@ "node": ">= 0.10" } }, - "node_modules/hash-wasm": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/hash-wasm/-/hash-wasm-4.12.0.tgz", - "integrity": "sha512-+/2B2rYLb48I/evdOIhP+K/DD2ca2fgBjp6O+GBEnCDk2e4rpeXIK8GvIyRPjTezgmWn9gmKwkQjjx6BtqDHVQ==", - "license": "MIT" - }, "node_modules/hash.js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", diff --git a/package.json b/package.json index 0d7cc6d5..1d618057 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "avsc": "^5.7.9", "bcryptjs": "^2.4.3", "bignumber.js": "^9.3.1", + "@noble/hashes": "2.2.0", "blakejs": "^1.2.1", "bootstrap": "4.6.2", "bootstrap-colorpicker": "^3.4.0", @@ -132,7 +133,6 @@ "flat": "^6.0.1", "geodesy": "1.1.3", "handlebars": "^4.7.9", - "hash-wasm": "^4.12.0", "highlight.js": "^11.11.1", "ieee754": "^1.2.1", "jimp": "1.6.0", diff --git a/src/core/operations/BLAKE3.mjs b/src/core/operations/BLAKE3.mjs index 0f686120..53f7fdd6 100644 --- a/src/core/operations/BLAKE3.mjs +++ b/src/core/operations/BLAKE3.mjs @@ -6,7 +6,10 @@ import Operation from "../Operation.mjs"; import OperationError from "../errors/OperationError.mjs"; -import { blake3 } from "hash-wasm"; +import Utils from "../Utils.mjs"; +import { blake3 } from "@noble/hashes/blake3.js"; +import { bytesToHex } from "@noble/hashes/utils.js"; + /** * BLAKE3 operation */ @@ -44,13 +47,16 @@ class BLAKE3 extends Operation { run(input, args) { const key = args[1]; const size = args[0]; - // Check if the user want a key hash or not - if (key === "") { - return blake3(input, size*8); - } if (key.length !== 32) { - throw new OperationError("The key must be exactly 32 bytes long"); + const opts = { dkLen: size }; + const inputBytes = new Uint8Array(Utils.strToArrayBuffer(input)); + if (key !== "") { + const keyBytes = new Uint8Array(Utils.strToArrayBuffer(key)); + if (keyBytes.length !== 32) { + throw new OperationError("The key must be exactly 32 bytes long"); + } + opts.key = keyBytes; } - return blake3(input, size*8, key); + return bytesToHex(blake3(inputBytes, opts)); } } diff --git a/tests/operations/tests/BLAKE3.mjs b/tests/operations/tests/BLAKE3.mjs index 42cb4dc1..b3c14e99 100644 --- a/tests/operations/tests/BLAKE3.mjs +++ b/tests/operations/tests/BLAKE3.mjs @@ -51,5 +51,23 @@ TestRegister.addTests([ { "op": "BLAKE3", "args": [8, "ThiskeyisexactlythirtytwoByteslo"] } ] + }, + { + name: "BLAKE3: 16390 - test", + input: "test", + expectedMatch: /4878.{32760}555fe06b242738d5/, + recipeConfig: [ + { "op": "BLAKE3", + "args": [16390, ""] } + ] + }, + { + name: "BLAKE3: 16390 - key test", + input: "test", + expectedMatch: /a8d0.{32760}19ccd9b9726b46ae/, + recipeConfig: [ + { "op": "BLAKE3", + "args": [16390, "ThiskeyisexactlythirtytwoBytesLo"] } + ] } ]); From 5f97ef18e1e7f3f40ef79fd7a472e66d5486404e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 12:04:33 +0100 Subject: [PATCH 2/4] chore (deps): bump webpack-bundle-analyzer from 5.2.0 to 5.3.0 (#2353) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 51 +++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e1958ab..37083031 100644 --- a/package-lock.json +++ b/package-lock.json @@ -157,7 +157,7 @@ "sitemap": "^8.0.3", "terser": "^5.46.2", "webpack": "^5.106.2", - "webpack-bundle-analyzer": "^5.0.0", + "webpack-bundle-analyzer": "^5.3.0", "webpack-dev-server": "^5.0.4", "webpack-node-externals": "^3.0.0", "worker-loader": "^3.0.8" @@ -2646,13 +2646,13 @@ } }, "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz", + "integrity": "sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=10.0.0" + "node": ">=14.17.0" } }, "node_modules/@es-joy/jsdoccomment": { @@ -8239,13 +8239,6 @@ "node": "*" } }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "dev": true, - "license": "MIT" - }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -11119,9 +11112,9 @@ } }, "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", + "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==", "dev": true, "license": "MIT" }, @@ -17975,19 +17968,18 @@ } }, "node_modules/webpack-bundle-analyzer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-5.2.0.tgz", - "integrity": "sha512-Etrauj1wYO/xjiz/Vfd6bW1lG9fEhrJpNmu10tv0X9kv+gyY3qiE09uYepqg1Xd0PxOvllRXwWYWjtQYoO/glQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-5.3.0.tgz", + "integrity": "sha512-PEhAoqiJ+47d0uLMx/+zo5XOvaU+Vk6N2ZLht7H3n09QLy/fhyvqGNwjdRUHJDgMN8crBR2ZwVHkIswT3Xuawg==", "dev": true, "license": "MIT", "dependencies": { - "@discoveryjs/json-ext": "0.5.7", + "@discoveryjs/json-ext": "^0.6.3", "acorn": "^8.0.4", "acorn-walk": "^8.0.0", - "commander": "^7.2.0", - "debounce": "^1.2.1", - "escape-string-regexp": "^4.0.0", - "html-escaper": "^2.0.2", + "commander": "^14.0.2", + "escape-string-regexp": "^5.0.0", + "html-escaper": "^3.0.3", "opener": "^1.5.2", "picocolors": "^1.0.0", "sirv": "^3.0.2", @@ -18000,14 +17992,17 @@ "node": ">= 20.9.0" } }, - "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "node_modules/webpack-bundle-analyzer/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true, "license": "MIT", "engines": { - "node": ">= 10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/webpack-dev-middleware": { diff --git a/package.json b/package.json index 1d618057..6c036ac7 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "sitemap": "^8.0.3", "terser": "^5.46.2", "webpack": "^5.106.2", - "webpack-bundle-analyzer": "^5.0.0", + "webpack-bundle-analyzer": "^5.3.0", "webpack-dev-server": "^5.0.4", "webpack-node-externals": "^3.0.0", "worker-loader": "^3.0.8" From ec4f1f560566886562d85c368c8d738429f6d9ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 12:28:26 +0100 Subject: [PATCH 3/4] chore (deps): bump uuid from 13.0.0 to 14.0.0 (#2332) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 37083031..4706684e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -102,7 +102,7 @@ "unorm": "^1.6.0", "url": "^0.11.4", "utf8": "^3.0.0", - "uuid": "^13.0.0", + "uuid": "^14.0.0", "vkbeautify": "^0.99.3", "xpath": "0.0.34", "xregexp": "^5.1.2", @@ -17794,9 +17794,9 @@ } }, "node_modules/uuid": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz", - "integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" diff --git a/package.json b/package.json index 6c036ac7..e2df4a68 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "unorm": "^1.6.0", "url": "^0.11.4", "utf8": "^3.0.0", - "uuid": "^13.0.0", + "uuid": "^14.0.0", "vkbeautify": "^0.99.3", "xpath": "0.0.34", "xregexp": "^5.1.2", From d5a0b87194217da40aa1674e34866dad9c3ef0f7 Mon Sep 17 00:00:00 2001 From: GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> Date: Thu, 7 May 2026 14:15:49 +0100 Subject: [PATCH 4/4] Update dependabot for Node 24. (#2361) - Reenable update of github actions - Unpin some packages --- .github/dependabot.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c1b09d96..e1b854f3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -33,8 +33,6 @@ updates: versions: [ '>=5.0.0' ] - dependency-name: 'cbor' versions: [ '>=10.0.0' ] - - dependency-name: 'cspell' - versions: [ '>=9.0.0' ] - dependency-name: 'eslint' versions: [ '>=10.0.0' ] - dependency-name: 'eslint-plugin-jsdoc' @@ -45,8 +43,6 @@ updates: versions: [ '>=2.0.0' ] - dependency-name: 'jimp' versions: [ '1.6.1' ] - - dependency-name: 'otpauth' - versions: [ '>=9.4.0' ] - dependency-name: 'webpack-dev-server' versions: [ '>=5.1.0' ] groups: @@ -60,15 +56,15 @@ updates: update-types: - 'patch' - # Can't enable this until we are using Node 24 as the latest actions all require this version - # - package-ecosystem: "github-actions" - # # Workflow files stored in the default location of `.github/workflows`; no need to - # # specify `/.github/workflows` for `directory` - # directory: '/' - # schedule: - # interval: 'weekly' - # day: 'friday' - # time: '03:00' - # timezone: Europe/London - # commit-message: - # prefix: 'chore (deps): ' + # Versioning on Github Actions + - package-ecosystem: "github-actions" + # Workflow files stored in the default location of `.github/workflows`; no need to + # specify `/.github/workflows` for `directory` + directory: '/' + schedule: + interval: 'weekly' + day: 'friday' + time: '03:00' + timezone: Europe/London + commit-message: + prefix: 'chore (deps): '