| 112 | } |
| 113 | |
| 114 | SecureString 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 | |
| 135 | std::unique_ptr<Decryptor> InternalFileDecryptor::GetColumnDecryptor( |
| 136 | const std::string& column_path, const std::string& column_key_metadata, |
nothing calls this directly
no test coverage detected