From b7dc91ab0816efd132beec002615f04db4cab6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 1 Sep 2022 07:09:22 +0000 Subject: [PATCH] src: fix incorrect comments in crypto PR-URL: https://github.com/nodejs/node/pull/44470 Reviewed-By: Ben Noordhuis Reviewed-By: Filip Skokan Reviewed-By: Anna Henningsen --- src/crypto/crypto_cipher.cc | 2 +- src/crypto/crypto_keygen.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crypto/crypto_cipher.cc b/src/crypto/crypto_cipher.cc index 6c663a2b21d0a2..de24a6f547fc84 100644 --- a/src/crypto/crypto_cipher.cc +++ b/src/crypto/crypto_cipher.cc @@ -480,7 +480,7 @@ void CipherBase::InitIv(const char* cipher_type, // Throw if an IV was passed which does not match the cipher's fixed IV length // static_cast for the iv_buf.size() is safe because we've verified - // prior that the value is not larger than MAX_INT. + // prior that the value is not larger than INT_MAX. if (!is_authenticated_mode && has_iv && static_cast(iv_buf.size()) != expected_iv_len) { diff --git a/src/crypto/crypto_keygen.h b/src/crypto/crypto_keygen.h index 7790588dd33324..1a933a247800d6 100644 --- a/src/crypto/crypto_keygen.h +++ b/src/crypto/crypto_keygen.h @@ -197,8 +197,8 @@ struct KeyPairGenTraits final { }; struct SecretKeyGenConfig final : public MemoryRetainer { - size_t length; // Expressed a a number of bits - char* out = nullptr; // Placeholder for the generated key bytes + size_t length; // In bytes. + char* out = nullptr; // Placeholder for the generated key bytes. void MemoryInfo(MemoryTracker* tracker) const override; SET_MEMORY_INFO_NAME(SecretKeyGenConfig)