Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix incorrect comments in crypto #44470

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/crypto/crypto_cipher.cc
Expand Up @@ -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<int> 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<int>(iv_buf.size()) != expected_iv_len) {
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/crypto_keygen.h
Expand Up @@ -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)
Expand Down