From c20e93547a1e4dd29a4ef52c829542bebef3ea61 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 --- 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 397f248f2ca61a..a6ce4de49d9bf6 100644 --- a/src/crypto/crypto_cipher.cc +++ b/src/crypto/crypto_cipher.cc @@ -493,7 +493,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 b0743efb38ddce..ed7d5c0601fff1 100644 --- a/src/crypto/crypto_keygen.h +++ b/src/crypto/crypto_keygen.h @@ -200,8 +200,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)