Skip to content

Commit cae9c5d

Browse files
tniessenjuanarbol
authored andcommitted
src: fix incorrect comments in crypto
PR-URL: #44470 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent c0875d1 commit cae9c5d

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
@@ -480,7 +480,7 @@ void CipherBase::InitIv(const char* cipher_type,
480480

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

src/crypto/crypto_keygen.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ struct KeyPairGenTraits final {
197197
};
198198

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

203203
void MemoryInfo(MemoryTracker* tracker) const override;
204204
SET_MEMORY_INFO_NAME(SecretKeyGenConfig)

0 commit comments

Comments
 (0)