Skip to content

Commit

Permalink
Use XOF constructor wrapper for cShake
Browse files Browse the repository at this point in the history
Switch to the XOF constructor wrapper to make the xof and xofInto
methods available for cShake.

Signed-off-by: Stefan Knoblich <[email protected]>
  • Loading branch information
Stefan Knoblich committed Feb 27, 2024
1 parent cf7e01c commit 342fe48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sha3-addons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function cshakePers(hash: Keccak, opts: cShakeOpts = {}): Keccak {
}

const gencShake = (suffix: number, blockLen: number, outputLen: number) =>
wrapConstructorWithOpts<Keccak, cShakeOpts>((opts: cShakeOpts = {}) =>
wrapXOFConstructorWithOpts<Keccak, cShakeOpts>((opts: cShakeOpts = {}) =>
cshakePers(new Keccak(blockLen, suffix, chooseLen(opts, outputLen), true), opts)
);

Expand Down

0 comments on commit 342fe48

Please sign in to comment.