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

Method GetColumnKey

cpp/src/parquet/encryption/internal_file_decryptor.cc:114–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114SecureString InternalFileDecryptor::GetColumnKey(const std::string& column_path,
115 const std::string& column_key_metadata) {
116 SecureString column_key = properties_->column_key(column_path);
117
118 // No explicit column key given via API. Retrieve via key metadata.
119 if (column_key.empty() && !column_key_metadata.empty() &&
120 properties_->key_retriever() != nullptr) {
121 try {
122 column_key = properties_->key_retriever()->GetKey(column_key_metadata);
123 } catch (KeyAccessDeniedException& e) {
124 std::stringstream ss;
125 ss << "HiddenColumnException, path=" + column_path + " " << e.what() << "\n";
126 throw HiddenColumnException(ss.str());
127 }
128 if (column_key.empty()) {
129 throw HiddenColumnException("HiddenColumnException, path=" + column_path);
130 }
131 }
132 return column_key;
133}
134
135std::unique_ptr<Decryptor> InternalFileDecryptor::GetColumnDecryptor(
136 const std::string& column_path, const std::string& column_key_metadata,

Callers

nothing calls this directly

Calls 5

key_retrieverMethod · 0.80
strMethod · 0.80
emptyMethod · 0.45
GetKeyMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected