Skip to content

Commit 1e2b5f0

Browse files
committed
crypto: reuse variable instead of reevaluation
PR-URL: nodejs#17735 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent fdf73b1 commit 1e2b5f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_crypto.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3372,7 +3372,7 @@ void CipherBase::Init(const char* cipher_type,
33723372
nullptr,
33733373
reinterpret_cast<unsigned char*>(key),
33743374
reinterpret_cast<unsigned char*>(iv),
3375-
kind_ == kCipher);
3375+
encrypt);
33763376
initialised_ = true;
33773377
}
33783378

@@ -3440,7 +3440,7 @@ void CipherBase::InitIv(const char* cipher_type,
34403440
nullptr,
34413441
reinterpret_cast<const unsigned char*>(key),
34423442
reinterpret_cast<const unsigned char*>(iv),
3443-
kind_ == kCipher);
3443+
encrypt);
34443444
initialised_ = true;
34453445
}
34463446

0 commit comments

Comments
 (0)