The SHA3
function allows for customizing the output length, as demonstrated in the code snippet below:
var hash = CryptoJS.SHA3("Message", { outputLength: 512 });
var hash = CryptoJS.SHA3("Message", { outputLength: 384 });
var hash = CryptoJS.SHA3("Message", { outputLength: 256 });
var hash = CryptoJS.SHA3("Message", { outputLength: 224 });
However, when attempting to specify the outputLength
parameter in TypeScript with @types/crypto-js, an error is encountered:
Argument of type '{ outputLength: number; }' is not assignable to parameter of type 'string | WordArray | undefined'. Object literal may only specify known properties, and 'outputLength' does not exist in type 'string | WordArray | undefined'.