crypto: reuse variable instead of reevaluation

Backport-PR-URL: https://github.com/nodejs/node/pull/19115
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Tobias Nießen authored and Myles Borins committed 2018-03-29 23:25:34 -04:00
1 parent 4d2efa2415
commit 969398d08e
1 file changed
+2 -2
+2 -2
View File
@@ -3256,7 +3256,7 @@ void CipherBase::Init(const char* cipher_type,
nullptr,
reinterpret_cast<unsigned char*>(key),
reinterpret_cast<unsigned char*>(iv),
kind_ == kCipher);
encrypt);
initialised_ = true;
}
@@ -3324,7 +3324,7 @@ void CipherBase::InitIv(const char* cipher_type,
nullptr,
reinterpret_cast<const unsigned char*>(key),
reinterpret_cast<const unsigned char*>(iv),
kind_ == kCipher);
encrypt);
initialised_ = true;
}