EnricoMi commented on code in PR #46017: URL: https://github.com/apache/arrow/pull/46017#discussion_r2182823133
########## 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; + } - /// Decrypts (unwraps) a key with the master key. + /// \brief Decrypts (unwraps) a key with the master key. + /// \deprecated Deprecated since 21.0.0. Implement UnWrapKey instead. + ARROW_DEPRECATED("Deprecated in 21.0.0. Implement UnWrapKey instead.") virtual std::string UnwrapKey(const std::string& wrapped_key, - const std::string& master_key_identifier) = 0; + const std::string& master_key_identifier) { + throw ParquetException("Not implemented"); + } + + /// \copydoc UnwrapKey(const std::string&, const std::string&) Review Comment: Docu say: > Note that \copydoc foo() is roughly equivalent to doing: > \brief \copybrief foo() > \details \copydetails foo() https://www.doxygen.nl/manual/commands.html#cmdcopydoc which sounds like this would not copy the deprecation. But you are right, to be sure I can duplicate the simple doc. -- 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