From dd8f7e7c0c38a13d5d990cfe10b755c0a23e68d2 Mon Sep 17 00:00:00 2001 From: Mustafa UZUN Date: Sun, 27 Aug 2023 19:11:10 +0300 Subject: [PATCH] crypto: fix duplicated switch-case return values --- lib/internal/crypto/util.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/internal/crypto/util.js b/lib/internal/crypto/util.js index 368b1bc012eff0..d0f7e898d3495c 100644 --- a/lib/internal/crypto/util.js +++ b/lib/internal/crypto/util.js @@ -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; } }