Merge remote-tracking branch 'upstream/master' into 181-responsive-ui
This commit is contained in:
commit
9c62380238
28
.github/dependabot.yml
vendored
28
.github/dependabot.yml
vendored
@ -33,8 +33,6 @@ updates:
|
|||||||
versions: [ '>=5.0.0' ]
|
versions: [ '>=5.0.0' ]
|
||||||
- dependency-name: 'cbor'
|
- dependency-name: 'cbor'
|
||||||
versions: [ '>=10.0.0' ]
|
versions: [ '>=10.0.0' ]
|
||||||
- dependency-name: 'cspell'
|
|
||||||
versions: [ '>=9.0.0' ]
|
|
||||||
- dependency-name: 'eslint'
|
- dependency-name: 'eslint'
|
||||||
versions: [ '>=10.0.0' ]
|
versions: [ '>=10.0.0' ]
|
||||||
- dependency-name: 'eslint-plugin-jsdoc'
|
- dependency-name: 'eslint-plugin-jsdoc'
|
||||||
@ -45,8 +43,6 @@ updates:
|
|||||||
versions: [ '>=2.0.0' ]
|
versions: [ '>=2.0.0' ]
|
||||||
- dependency-name: 'jimp'
|
- dependency-name: 'jimp'
|
||||||
versions: [ '1.6.1' ]
|
versions: [ '1.6.1' ]
|
||||||
- dependency-name: 'otpauth'
|
|
||||||
versions: [ '>=9.4.0' ]
|
|
||||||
- dependency-name: 'webpack-dev-server'
|
- dependency-name: 'webpack-dev-server'
|
||||||
versions: [ '>=5.1.0' ]
|
versions: [ '>=5.1.0' ]
|
||||||
groups:
|
groups:
|
||||||
@ -60,15 +56,15 @@ updates:
|
|||||||
update-types:
|
update-types:
|
||||||
- 'patch'
|
- 'patch'
|
||||||
|
|
||||||
# Can't enable this until we are using Node 24 as the latest actions all require this version
|
# Versioning on Github Actions
|
||||||
# - package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
# # Workflow files stored in the default location of `.github/workflows`; no need to
|
# Workflow files stored in the default location of `.github/workflows`; no need to
|
||||||
# # specify `/.github/workflows` for `directory`
|
# specify `/.github/workflows` for `directory`
|
||||||
# directory: '/'
|
directory: '/'
|
||||||
# schedule:
|
schedule:
|
||||||
# interval: 'weekly'
|
interval: 'weekly'
|
||||||
# day: 'friday'
|
day: 'friday'
|
||||||
# time: '03:00'
|
time: '03:00'
|
||||||
# timezone: Europe/London
|
timezone: Europe/London
|
||||||
# commit-message:
|
commit-message:
|
||||||
# prefix: 'chore (deps): '
|
prefix: 'chore (deps): '
|
||||||
|
|||||||
67
package-lock.json
generated
67
package-lock.json
generated
@ -13,6 +13,7 @@
|
|||||||
"@alexaltea/capstone-js": "^3.0.5",
|
"@alexaltea/capstone-js": "^3.0.5",
|
||||||
"@astronautlabs/amf": "^0.0.6",
|
"@astronautlabs/amf": "^0.0.6",
|
||||||
"@blu3r4y/lzma": "^2.3.3",
|
"@blu3r4y/lzma": "^2.3.3",
|
||||||
|
"@noble/hashes": "2.2.0",
|
||||||
"@wavesenterprise/crypto-gost-js": "^2.1.0-RC1",
|
"@wavesenterprise/crypto-gost-js": "^2.1.0-RC1",
|
||||||
"@xmldom/xmldom": "^0.8.13",
|
"@xmldom/xmldom": "^0.8.13",
|
||||||
"argon2-browser": "^1.18.0",
|
"argon2-browser": "^1.18.0",
|
||||||
@ -49,7 +50,6 @@
|
|||||||
"flat": "^6.0.1",
|
"flat": "^6.0.1",
|
||||||
"geodesy": "1.1.3",
|
"geodesy": "1.1.3",
|
||||||
"handlebars": "^4.7.9",
|
"handlebars": "^4.7.9",
|
||||||
"hash-wasm": "^4.12.0",
|
|
||||||
"highlight.js": "^11.11.1",
|
"highlight.js": "^11.11.1",
|
||||||
"ieee754": "^1.2.1",
|
"ieee754": "^1.2.1",
|
||||||
"jimp": "1.6.0",
|
"jimp": "1.6.0",
|
||||||
@ -102,7 +102,7 @@
|
|||||||
"unorm": "^1.6.0",
|
"unorm": "^1.6.0",
|
||||||
"url": "^0.11.4",
|
"url": "^0.11.4",
|
||||||
"utf8": "^3.0.0",
|
"utf8": "^3.0.0",
|
||||||
"uuid": "^13.0.0",
|
"uuid": "^14.0.0",
|
||||||
"vkbeautify": "^0.99.3",
|
"vkbeautify": "^0.99.3",
|
||||||
"xpath": "0.0.34",
|
"xpath": "0.0.34",
|
||||||
"xregexp": "^5.1.2",
|
"xregexp": "^5.1.2",
|
||||||
@ -157,7 +157,7 @@
|
|||||||
"sitemap": "^8.0.3",
|
"sitemap": "^8.0.3",
|
||||||
"terser": "^5.46.2",
|
"terser": "^5.46.2",
|
||||||
"webpack": "^5.106.2",
|
"webpack": "^5.106.2",
|
||||||
"webpack-bundle-analyzer": "^5.0.0",
|
"webpack-bundle-analyzer": "^5.3.0",
|
||||||
"webpack-dev-server": "^5.0.4",
|
"webpack-dev-server": "^5.0.4",
|
||||||
"webpack-node-externals": "^3.0.0",
|
"webpack-node-externals": "^3.0.0",
|
||||||
"worker-loader": "^3.0.8"
|
"worker-loader": "^3.0.8"
|
||||||
@ -2646,13 +2646,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@discoveryjs/json-ext": {
|
"node_modules/@discoveryjs/json-ext": {
|
||||||
"version": "0.5.7",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz",
|
||||||
"integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
|
"integrity": "sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=14.17.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@es-joy/jsdoccomment": {
|
"node_modules/@es-joy/jsdoccomment": {
|
||||||
@ -8239,13 +8239,6 @@
|
|||||||
"node": "*"
|
"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": {
|
"node_modules/debug": {
|
||||||
"version": "4.4.3",
|
"version": "4.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
||||||
@ -11018,12 +11011,6 @@
|
|||||||
"node": ">= 0.10"
|
"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": {
|
"node_modules/hash.js": {
|
||||||
"version": "1.1.7",
|
"version": "1.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
|
||||||
@ -11125,9 +11112,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/html-escaper": {
|
"node_modules/html-escaper": {
|
||||||
"version": "2.0.2",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz",
|
||||||
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
|
"integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
@ -17807,9 +17794,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/uuid": {
|
"node_modules/uuid": {
|
||||||
"version": "13.0.0",
|
"version": "14.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz",
|
||||||
"integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==",
|
"integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==",
|
||||||
"funding": [
|
"funding": [
|
||||||
"https://github.com/sponsors/broofa",
|
"https://github.com/sponsors/broofa",
|
||||||
"https://github.com/sponsors/ctavan"
|
"https://github.com/sponsors/ctavan"
|
||||||
@ -17981,19 +17968,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/webpack-bundle-analyzer": {
|
"node_modules/webpack-bundle-analyzer": {
|
||||||
"version": "5.2.0",
|
"version": "5.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-5.3.0.tgz",
|
||||||
"integrity": "sha512-Etrauj1wYO/xjiz/Vfd6bW1lG9fEhrJpNmu10tv0X9kv+gyY3qiE09uYepqg1Xd0PxOvllRXwWYWjtQYoO/glQ==",
|
"integrity": "sha512-PEhAoqiJ+47d0uLMx/+zo5XOvaU+Vk6N2ZLht7H3n09QLy/fhyvqGNwjdRUHJDgMN8crBR2ZwVHkIswT3Xuawg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discoveryjs/json-ext": "0.5.7",
|
"@discoveryjs/json-ext": "^0.6.3",
|
||||||
"acorn": "^8.0.4",
|
"acorn": "^8.0.4",
|
||||||
"acorn-walk": "^8.0.0",
|
"acorn-walk": "^8.0.0",
|
||||||
"commander": "^7.2.0",
|
"commander": "^14.0.2",
|
||||||
"debounce": "^1.2.1",
|
"escape-string-regexp": "^5.0.0",
|
||||||
"escape-string-regexp": "^4.0.0",
|
"html-escaper": "^3.0.3",
|
||||||
"html-escaper": "^2.0.2",
|
|
||||||
"opener": "^1.5.2",
|
"opener": "^1.5.2",
|
||||||
"picocolors": "^1.0.0",
|
"picocolors": "^1.0.0",
|
||||||
"sirv": "^3.0.2",
|
"sirv": "^3.0.2",
|
||||||
@ -18006,14 +17992,17 @@
|
|||||||
"node": ">= 20.9.0"
|
"node": ">= 20.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/webpack-bundle-analyzer/node_modules/commander": {
|
"node_modules/webpack-bundle-analyzer/node_modules/escape-string-regexp": {
|
||||||
"version": "7.2.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
|
||||||
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
|
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10"
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/webpack-dev-middleware": {
|
"node_modules/webpack-dev-middleware": {
|
||||||
|
|||||||
@ -87,7 +87,7 @@
|
|||||||
"sitemap": "^8.0.3",
|
"sitemap": "^8.0.3",
|
||||||
"terser": "^5.46.2",
|
"terser": "^5.46.2",
|
||||||
"webpack": "^5.106.2",
|
"webpack": "^5.106.2",
|
||||||
"webpack-bundle-analyzer": "^5.0.0",
|
"webpack-bundle-analyzer": "^5.3.0",
|
||||||
"webpack-dev-server": "^5.0.4",
|
"webpack-dev-server": "^5.0.4",
|
||||||
"webpack-node-externals": "^3.0.0",
|
"webpack-node-externals": "^3.0.0",
|
||||||
"worker-loader": "^3.0.8"
|
"worker-loader": "^3.0.8"
|
||||||
@ -104,6 +104,7 @@
|
|||||||
"avsc": "^5.7.9",
|
"avsc": "^5.7.9",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"bignumber.js": "^9.3.1",
|
"bignumber.js": "^9.3.1",
|
||||||
|
"@noble/hashes": "2.2.0",
|
||||||
"blakejs": "^1.2.1",
|
"blakejs": "^1.2.1",
|
||||||
"bootstrap": "4.6.2",
|
"bootstrap": "4.6.2",
|
||||||
"bootstrap-colorpicker": "^3.4.0",
|
"bootstrap-colorpicker": "^3.4.0",
|
||||||
@ -132,7 +133,6 @@
|
|||||||
"flat": "^6.0.1",
|
"flat": "^6.0.1",
|
||||||
"geodesy": "1.1.3",
|
"geodesy": "1.1.3",
|
||||||
"handlebars": "^4.7.9",
|
"handlebars": "^4.7.9",
|
||||||
"hash-wasm": "^4.12.0",
|
|
||||||
"highlight.js": "^11.11.1",
|
"highlight.js": "^11.11.1",
|
||||||
"ieee754": "^1.2.1",
|
"ieee754": "^1.2.1",
|
||||||
"jimp": "1.6.0",
|
"jimp": "1.6.0",
|
||||||
@ -185,7 +185,7 @@
|
|||||||
"unorm": "^1.6.0",
|
"unorm": "^1.6.0",
|
||||||
"url": "^0.11.4",
|
"url": "^0.11.4",
|
||||||
"utf8": "^3.0.0",
|
"utf8": "^3.0.0",
|
||||||
"uuid": "^13.0.0",
|
"uuid": "^14.0.0",
|
||||||
"vkbeautify": "^0.99.3",
|
"vkbeautify": "^0.99.3",
|
||||||
"xpath": "0.0.34",
|
"xpath": "0.0.34",
|
||||||
"xregexp": "^5.1.2",
|
"xregexp": "^5.1.2",
|
||||||
|
|||||||
@ -6,7 +6,10 @@
|
|||||||
|
|
||||||
import Operation from "../Operation.mjs";
|
import Operation from "../Operation.mjs";
|
||||||
import OperationError from "../errors/OperationError.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
|
* BLAKE3 operation
|
||||||
*/
|
*/
|
||||||
@ -44,13 +47,16 @@ class BLAKE3 extends Operation {
|
|||||||
run(input, args) {
|
run(input, args) {
|
||||||
const key = args[1];
|
const key = args[1];
|
||||||
const size = args[0];
|
const size = args[0];
|
||||||
// Check if the user want a key hash or not
|
const opts = { dkLen: size };
|
||||||
if (key === "") {
|
const inputBytes = new Uint8Array(Utils.strToArrayBuffer(input));
|
||||||
return blake3(input, size*8);
|
if (key !== "") {
|
||||||
} if (key.length !== 32) {
|
const keyBytes = new Uint8Array(Utils.strToArrayBuffer(key));
|
||||||
throw new OperationError("The key must be exactly 32 bytes long");
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,5 +51,23 @@ TestRegister.addTests([
|
|||||||
{ "op": "BLAKE3",
|
{ "op": "BLAKE3",
|
||||||
"args": [8, "ThiskeyisexactlythirtytwoByteslo"] }
|
"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"] }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user