Skip to content

Commit e2b7ad8

Browse files
tniessenMylesBorins
authored andcommitted
crypto: reuse variable instead of reevaluation
Backport-PR-URL: #19115 PR-URL: #17735 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 850da0f commit e2b7ad8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)