Skip to content

Commit aa34f73

Browse files
tniessenRafaelGSS
authored andcommitted
src: fix incorrect comments in crypto
PR-URL: #44470 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 18b7208 commit aa34f73

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/crypto/crypto_cipher.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ void CipherBase::InitIv(const char* cipher_type,
493493

494494
// Throw if an IV was passed which does not match the cipher's fixed IV length
495495
// static_cast<int> for the iv_buf.size() is safe because we've verified
496-
// prior that the value is not larger than MAX_INT.
496+
// prior that the value is not larger than INT_MAX.
497497
if (!is_authenticated_mode &&
498498
has_iv &&
499499
static_cast<int>(iv_buf.size()) != expected_iv_len) {

src/crypto/crypto_keygen.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ struct KeyPairGenTraits final {
200200
};
201201

202202
struct SecretKeyGenConfig final : public MemoryRetainer {
203-
size_t length; // Expressed a a number of bits
204-
char* out = nullptr; // Placeholder for the generated key bytes
203+
size_t length; // In bytes.
204+
char* out = nullptr; // Placeholder for the generated key bytes.
205205

206206
void MemoryInfo(MemoryTracker* tracker) const override;
207207
SET_MEMORY_INFO_NAME(SecretKeyGenConfig)

0 commit comments

Comments
 (0)