adamreeve commented on code in PR #43195:
URL: https://github.com/apache/arrow/pull/43195#discussion_r1673413884
##########
cpp/src/parquet/metadata.cc:
##########
@@ -701,12 +702,12 @@ class FileMetaData::FileMetaDataImpl {
uint8_t* serialized_data;
uint32_t serialized_len;
serializer.SerializeToBuffer(metadata_.get(), &serialized_len,
&serialized_data);
+ ::arrow::util::span<const uint8_t> serialized_data_span(serialized_data,
+ serialized_len);
// encrypt the footer key
- std::vector<uint8_t> encrypted_data(encryptor->CiphertextSizeDelta() +
- serialized_len);
- unsigned encrypted_len =
- encryptor->Encrypt(serialized_data, serialized_len,
encrypted_data.data());
+ std::vector<uint8_t>
encrypted_data(encryptor->CiphertextLength(serialized_len));
+ unsigned encrypted_len = encryptor->Encrypt(serialized_data_span,
encrypted_data);
Review Comment:
I've changed this to `int` now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]