Skip to content

Commit

Permalink
crypto: fix duplicated switch-case return values
Browse files Browse the repository at this point in the history
PR-URL: #49030
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
0o001 authored and targos committed May 12, 2024
1 parent 578868d commit 0d040a3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/internal/crypto/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,14 @@ function getUsagesUnion(usageSet, ...usages) {

function getBlockSize(name) {
switch (name) {
case 'SHA-1': return 512;
case 'SHA-256': return 512;
case 'SHA-384': return 1024;
case 'SHA-512': return 1024;
case 'SHA-1':
// Fall through
case 'SHA-256':
return 512;
case 'SHA-384':
// Fall through
case 'SHA-512':
return 1024;
}
}

Expand Down

0 comments on commit 0d040a3

Please sign in to comment.