MCPcopy Create free account
hub / github.com/apache/arrow / GetKey

Method GetKey

cpp/src/parquet/arrow/fuzz_internal.cc:78–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76class 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 PARQUET_ASSIGN_OR_THROW(
87 auto decoded_key,
88 ::arrow::util::base64_decode(key_id.substr(kInlineKeyPrefix.length())));
89
90 return SecureString(std::move(decoded_key));
91 }
92 throw ParquetException("Unknown fuzz encryption key_id");
93 }
94};
95
96std::shared_ptr<DecryptionKeyRetriever> MakeKeyRetriever() {

Callers

nothing calls this directly

Calls 4

SecureStringFunction · 0.85
ParquetExceptionFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected