Skip to content

Commit dd8f7e7

Browse files
0o001aduh95
authored andcommitted
crypto: fix duplicated switch-case return values
1 parent c4d0229 commit dd8f7e7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/internal/crypto/util.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,14 @@ function getUsagesUnion(usageSet, ...usages) {
510510

511511
function getBlockSize(name) {
512512
switch (name) {
513-
case 'SHA-1': return 512;
514-
case 'SHA-256': return 512;
515-
case 'SHA-384': return 1024;
516-
case 'SHA-512': return 1024;
513+
case 'SHA-1':
514+
// Fall through
515+
case 'SHA-256':
516+
return 512;
517+
case 'SHA-384':
518+
// Fall through
519+
case 'SHA-512':
520+
return 1024;
517521
}
518522
}
519523

0 commit comments

Comments
 (0)