| 311 | }; |
| 312 | |
| 313 | void SerializedPageReader::InitDecryption() { |
| 314 | // Prepare the AAD for quick update later. |
| 315 | if (crypto_ctx_.data_decryptor_factory) { |
| 316 | data_decryptor_ = crypto_ctx_.data_decryptor_factory(); |
| 317 | if (data_decryptor_) { |
| 318 | ARROW_DCHECK(!data_decryptor_->file_aad().empty()); |
| 319 | data_page_aad_ = encryption::CreateModuleAad( |
| 320 | data_decryptor_->file_aad(), encryption::kDataPage, |
| 321 | crypto_ctx_.row_group_ordinal, crypto_ctx_.column_ordinal, kNonPageOrdinal); |
| 322 | } |
| 323 | } |
| 324 | if (crypto_ctx_.meta_decryptor_factory) { |
| 325 | meta_decryptor_ = crypto_ctx_.meta_decryptor_factory(); |
| 326 | if (meta_decryptor_) { |
| 327 | ARROW_DCHECK(!meta_decryptor_->file_aad().empty()); |
| 328 | data_page_header_aad_ = encryption::CreateModuleAad( |
| 329 | meta_decryptor_->file_aad(), encryption::kDataPageHeader, |
| 330 | crypto_ctx_.row_group_ordinal, crypto_ctx_.column_ordinal, kNonPageOrdinal); |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | void SerializedPageReader::UpdateDecryption(Decryptor* decryptor, int8_t module_type, |
| 336 | std::string* page_aad) { |
nothing calls this directly
no test coverage detected