| 76 | class FuzzDecryptionKeyRetriever : public DecryptionKeyRetriever { |
| 77 | public: |
| 78 | SecureString GetKey(const std::string& key_id) override { |
| 79 | // Is it one of the keys used in parquet-testing? |
| 80 | auto it = kTestingKeys.find(key_id); |
| 81 | if (it != kTestingKeys.end()) { |
| 82 | return it->second; |
| 83 | } |
| 84 | // Is it a key generated by MakeEncryptionKey? |
| 85 | if (key_id.starts_with(kInlineKeyPrefix)) { |
| 86 | return SecureString( |
| 87 | ::arrow::util::base64_decode(key_id.substr(kInlineKeyPrefix.length()))); |
| 88 | } |
| 89 | throw ParquetException("Unknown fuzz encryption key_id"); |
| 90 | } |
| 91 | }; |
| 92 | |
| 93 | std::shared_ptr<DecryptionKeyRetriever> MakeKeyRetriever() { |
nothing calls this directly
no test coverage detected