@@ -49,22 +49,7 @@ using ColumnPathToEncryptionPropertiesMap =
4949class PARQUET_EXPORT DecryptionKeyRetriever {
5050 public:
5151 // / \brief Retrieve a key.
52- // / \deprecated Deprecated since 22.0.0.
53- // / Implement GetKeyById(const std::string&) instead.
54- ARROW_DEPRECATED (
55- " Deprecated in 22.0.0. "
56- " Implement GetKeyById(const std::string&) instead." )
57- virtual std::string GetKey (const std::string& key_id) {
58- throw ParquetException (" Not implemented" );
59- }
60-
61- // / \brief Retrieve a key by its id.
62- virtual ::arrow::util::SecureString GetKeyById (const std::string& key_id) {
63- ARROW_SUPPRESS_DEPRECATION_WARNING
64- auto key = ::arrow::util::SecureString (GetKey (key_id));
65- ARROW_UNSUPPRESS_DEPRECATION_WARNING
66- return key;
67- }
52+ virtual ::arrow::util::SecureString GetKey (const std::string& key_id) = 0;
6853
6954 virtual ~DecryptionKeyRetriever () {}
7055};
@@ -74,18 +59,16 @@ class PARQUET_EXPORT IntegerKeyIdRetriever : public DecryptionKeyRetriever {
7459 public:
7560 void PutKey (uint32_t key_id, ::arrow::util::SecureString key);
7661
77- ::arrow::util::SecureString GetKeyById (const std::string& key_id_string) override {
62+ ::arrow::util::SecureString GetKey (const std::string& key_id_string) override {
7863 // key_id_string is string but for IntegerKeyIdRetriever it encodes
7964 // a native-endian 32 bit unsigned integer key_id
8065 uint32_t key_id;
8166 assert (key_id_string.size () == sizeof (key_id));
8267 memcpy (&key_id, key_id_string.data (), sizeof (key_id));
8368
84- return GetKeyById (key_id);
69+ return key_map_. at (key_id);
8570 }
8671
87- ::arrow::util::SecureString GetKeyById (uint32_t key_id) { return key_map_.at (key_id); }
88-
8972 private:
9073 std::map<uint32_t , ::arrow::util::SecureString> key_map_;
9174};
@@ -94,7 +77,7 @@ class PARQUET_EXPORT IntegerKeyIdRetriever : public DecryptionKeyRetriever {
9477class PARQUET_EXPORT StringKeyIdRetriever : public DecryptionKeyRetriever {
9578 public:
9679 void PutKey (std::string key_id, ::arrow::util::SecureString key);
97- ::arrow::util::SecureString GetKeyById (const std::string& key_id) override ;
80+ ::arrow::util::SecureString GetKey (const std::string& key_id) override ;
9881
9982 private:
10083 std::map<std::string, ::arrow::util::SecureString> key_map_;
@@ -143,11 +126,6 @@ class PARQUET_EXPORT ColumnEncryptionProperties {
143126 // / be encrypted with the footer key.
144127 // / keyBytes Key length must be either 16, 24 or 32 bytes.
145128 // / Caller is responsible for wiping out the input key array.
146- // / \deprecated "Deprecated in 22.0.0. Use key(arrow::util::SecureString) instead."
147- ARROW_DEPRECATED (" Deprecated in 22.0.0. Use key(arrow::util::SecureString) instead." )
148- Builder* key (std::string column_key);
149-
150- // / \copydoc key(std::string)
151129 Builder* key (::arrow::util::SecureString column_key);
152130
153131 // / Set a key retrieval metadata.
@@ -259,14 +237,6 @@ class PARQUET_EXPORT FileDecryptionProperties {
259237 // / will be wiped out (array values set to 0).
260238 // / Caller is responsible for wiping out the input key array.
261239 // / param footerKey Key length must be either 16, 24 or 32 bytes.
262- // / \deprecated Deprecated since 22.0.0.
263- // / Use footer_key(arrow::util::SecureString) instead.
264- ARROW_DEPRECATED (
265- " Deprecated in 22.0.0. "
266- " Use footer_key(arrow::util::SecureString) instead." )
267- Builder* footer_key (std::string footer_key);
268-
269- // / \copydoc footer_key(std::string footer_key)
270240 Builder* footer_key (::arrow::util::SecureString footer_key);
271241
272242 // / Set explicit column keys (decryption properties).
@@ -376,14 +346,6 @@ class PARQUET_EXPORT FileEncryptionProperties {
376346 public:
377347 class PARQUET_EXPORT Builder {
378348 public:
379- // / \deprecated Deprecated since 22.0.0. Use Builder(arrow::util::SecureString)
380- // / instead.
381- ARROW_DEPRECATED (
382- " Deprecated in 22.0.0. "
383- " Use Builder(arrow::util::SecureString) instead" )
384- explicit Builder (std::string footer_key)
385- : Builder(::arrow::util::SecureString(std::move(footer_key))) {}
386-
387349 explicit Builder (::arrow::util::SecureString footer_key)
388350 : parquet_cipher_(kDefaultEncryptionAlgorithm ),
389351 encrypted_footer_(kDefaultEncryptedFooter ),
0 commit comments