adamreeve commented on code in PR #9203:
URL: https://github.com/apache/arrow-rs/pull/9203#discussion_r2795671597
##########
parquet/src/encryption/decrypt.rs:
##########
@@ -505,6 +510,12 @@ impl DecryptionPropertiesBuilder {
Ok(self)
}
+ /// The AEAD decryption algorithm to be used.
+ pub fn with_algorithm(mut self, algorithm: &'static Algorithm) -> Self {
Review Comment:
Yes I don't like this and I don't think it's necessary, see my comment on
`new_with_algorithm`. This also makes it possible for users to easily create
Parquet files that aren't compliant with the spec by using a non-standard
algorithm.
Changing the crypto library is something we might potentially want to do to
be able to add AES_GCM_CTR support for example
(https://github.com/apache/arrow-rs/issues/7258#issuecomment-2759562283).
I think if we want to support new algorithms like AES_GCM_CTR in the future
the user should provide an enum value from a supported set of algorithms like
is done in the [C++
implementation](https://github.com/apache/arrow/blob/e11aeeee4c032513a4ee895c22246bf5bb7eaf3f/cpp/src/parquet/encryption/encryption.h#L357),
but we can infer the key length from the provided key so this isn't necessary
for this change.
--
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]