fix : delete space and add new line

This commit is contained in:
Jeremy Giudicelli 2025-04-17 13:27:45 +02:00
parent ad91099d5e
commit 26d8fa51b0
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@
import Operation from "../Operation.mjs";
import OperationError from "../errors/OperationError.mjs";
import { blake3 } from 'hash-wasm';
import { blake3 } from "hash-wasm";
/**
* BLAKE3 operation
*/
@ -32,7 +32,7 @@ class BLAKE3 extends Operation {
"name": "Key",
"type": "string",
"value": ""
},
}
];
}
@ -47,7 +47,7 @@ class BLAKE3 extends Operation {
// Check if the user want a key hash or not
if (key === "") {
return blake3(input, size*8);
}if (key.length !== 32) {
} if (key.length !== 32) {
throw new OperationError("The key must be exactly 32 bytes long");
}
return blake3(input, size*8, key);