Merge remote-tracking branch 'upstream/master' into 181-responsive-ui

This commit is contained in:
Matt C 2026-05-07 12:54:46 -04:00
commit 9c62380238
5 changed files with 74 additions and 65 deletions

View File

@ -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): '

67
package-lock.json generated
View File

@ -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",
@ -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",
@ -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",
@ -11018,12 +11011,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",
@ -11125,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"
},
@ -17807,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"
@ -17981,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",
@ -18006,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": {

View File

@ -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"
@ -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",
@ -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",

View File

@ -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) {
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");
}
return blake3(input, size*8, key);
opts.key = keyBytes;
}
return bytesToHex(blake3(inputBytes, opts));
}
}

View File

@ -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"] }
]
}
]);