EnricoMi commented on code in PR #46017: URL: https://github.com/apache/arrow/pull/46017#discussion_r2182810826
########## cpp/src/parquet/encryption/kms_client.h: ########## @@ -79,14 +80,47 @@ class PARQUET_EXPORT KmsClient { static constexpr const char kKmsInstanceUrlDefault[] = "DEFAULT"; static constexpr const char kKeyAccessTokenDefault[] = "DEFAULT"; - /// Wraps a key - encrypts it with the master key, encodes the result + /// \brief Wraps a key. + /// + /// Encrypts it with the master key, encodes the result /// and potentially adds a KMS-specific metadata. + /// + /// \deprecated Deprecated since 21.0.0. Implement + /// WrapKey(const SecureString&, const std::string&) instead. + ARROW_DEPRECATED( + "Deprecated in 21.0.0. " + "Implement WrapKey(const SecureString&, const std::string&) instead.") virtual std::string WrapKey(const std::string& key_bytes, - const std::string& master_key_identifier) = 0; + const std::string& master_key_identifier) { + throw ParquetException("Not implemented"); + } + + /// \copydoc WrapKey(const std::string&, const std::string&) + virtual std::string WrapKey(const ::arrow::util::SecureString& key_bytes, + const std::string& master_key_identifier) { + ARROW_SUPPRESS_DEPRECATION_WARNING + auto key = WrapKey(std::string(key_bytes.as_view()), master_key_identifier); + ARROW_UNSUPPRESS_DEPRECATION_WARNING + return key; Review Comment: So you prefer to force user code to be migrated in order to compile against the new Arrow version? Happy to do that, simplifies my code changes. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org