Skip to content

Commit

Permalink
fix switch syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
querolita committed Dec 18, 2024
1 parent 47e12da commit 06afc51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/provable/gadgets/sha2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ const SHA2 = {
padding,
initialState<T extends UInt32 | UInt64>(length: Length): T[] {
switch (length) {
case 224 | 256:
case 224:
case 256:
return SHA2Constants.H[length].map((x) => UInt32.from(x) as T);
case 384 | 512:
case 384:
case 512:
return SHA2Constants.H[length].map((x) => UInt64.from(x) as T);
default:
throw new Error('Invalid hash length');
}
},
};
Expand Down

0 comments on commit 06afc51

Please sign in to comment.