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

[C++][Parquet] Refactor Encryptor API to use arrow::util::span instead of raw pointers #43142

Closed
adamreeve opened this issue Jul 4, 2024 · 1 comment

Comments

@adamreeve
Copy link
Contributor

Describe the enhancement requested

This change was made to the Decryptor API in #43071, we should do the same for the Encryptor API for consistency and to make the code more maintainable.

Component(s)

C++, Parquet

pitrou added a commit that referenced this issue Jul 11, 2024
…pan instead of raw pointers (#43195)

### Rationale for this change

See #43142. This is a follow up to #43071 which refactored the Decryptor API and added extra checks to prevent segfaults. This PR makes similar changes to the Encryptor API for consistency and better maintainability.

### What changes are included in this PR?

* Change `AesEncryptor::Encrypt` and `Encryptor::Encrypt` to use `arrow::util::span` instead of raw pointers
* Replace the `AesEncryptor::CiphertextSizeDelta` method with a `CiphertextLength` method that checks for overflow and abstracts the size difference behaviour away from consumer code for improved readability.

### Are these changes tested?

* This is mostly a refactoring of existing code so is covered by existing tests.

### Are there any user-facing changes?

No
* GitHub Issue: #43142

Lead-authored-by: Adam Reeve <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
@pitrou pitrou added this to the 18.0.0 milestone Jul 11, 2024
@pitrou
Copy link
Member

pitrou commented Jul 11, 2024

Issue resolved by pull request 43195
#43195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants