dilithium-crystals-js 1.0.3 → 1.0.4
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.
- package/package.json +1 -1
- package/src/browser/index.js +7 -3
package/package.json
CHANGED
package/src/browser/index.js
CHANGED
@@ -3,8 +3,12 @@ import { DILITHIUM_PARAMS, generateKeys, sign, verify } from "../common";
|
|
3
3
|
|
4
4
|
// Function to fetch the WebAssembly file
|
5
5
|
async function fetchWasm() {
|
6
|
-
console.log(
|
7
|
-
|
6
|
+
console.log(
|
7
|
+
`fetching wasm from /node_modules/dilithium-crystals-js/dilithium.wasm`
|
8
|
+
);
|
9
|
+
const response = await fetch(
|
10
|
+
"/node_modules/dilithium-crystals-js/dilithium.wasm"
|
11
|
+
);
|
8
12
|
return await response.arrayBuffer();
|
9
13
|
}
|
10
14
|
|
@@ -16,7 +20,7 @@ const createDilithium = () =>
|
|
16
20
|
wasmBinary,
|
17
21
|
locateFile: (path) => {
|
18
22
|
if (path.endsWith(".wasm")) {
|
19
|
-
return "/node_modules/dilithium-js/dilithium.wasm";
|
23
|
+
return "/node_modules/dilithium-crystals-js/dilithium.wasm";
|
20
24
|
}
|
21
25
|
return path;
|
22
26
|
},
|