Skip to content

Commit 1350035

Browse files
committed
crypto: fix duplicated switch-case return values
1 parent c9b1d6c commit 1350035

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
@@ -490,10 +490,14 @@ function getUsagesUnion(usageSet, ...usages) {
490490

491491
function getBlockSize(name) {
492492
switch (name) {
493-
case 'SHA-1': return 512;
494-
case 'SHA-256': return 512;
495-
case 'SHA-384': return 1024;
496-
case 'SHA-512': return 1024;
493+
case 'SHA-1':
494+
// Fall through
495+
case 'SHA-256':
496+
return 512;
497+
case 'SHA-384':
498+
// Fall through
499+
case 'SHA-512':
500+
return 1024;
497501
}
498502
}
499503

0 commit comments

Comments
 (0)