From 342fe4852dff1071e784415048381837e33dfa98 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Tue, 27 Feb 2024 19:41:08 +0100 Subject: [PATCH] Use XOF constructor wrapper for cShake Switch to the XOF constructor wrapper to make the xof and xofInto methods available for cShake. Signed-off-by: Stefan Knoblich --- src/sha3-addons.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sha3-addons.ts b/src/sha3-addons.ts index 7bc069a..d248885 100644 --- a/src/sha3-addons.ts +++ b/src/sha3-addons.ts @@ -54,7 +54,7 @@ function cshakePers(hash: Keccak, opts: cShakeOpts = {}): Keccak { } const gencShake = (suffix: number, blockLen: number, outputLen: number) => - wrapConstructorWithOpts((opts: cShakeOpts = {}) => + wrapXOFConstructorWithOpts((opts: cShakeOpts = {}) => cshakePers(new Keccak(blockLen, suffix, chooseLen(opts, outputLen), true), opts) );