| 346 | }; |
| 347 | |
| 348 | void SerializedPageReader::InitDecryption() { |
| 349 | // Prepare the AAD for quick update later. |
| 350 | if (crypto_ctx_.data_decryptor_factory) { |
| 351 | data_decryptor_ = crypto_ctx_.data_decryptor_factory(); |
| 352 | if (data_decryptor_) { |
| 353 | ARROW_DCHECK(!data_decryptor_->file_aad().empty()); |
| 354 | data_page_aad_ = encryption::CreateModuleAad( |
| 355 | data_decryptor_->file_aad(), encryption::kDataPage, |
| 356 | crypto_ctx_.row_group_ordinal, crypto_ctx_.column_ordinal, kNonPageOrdinal); |
| 357 | } |
| 358 | } |
| 359 | if (crypto_ctx_.meta_decryptor_factory) { |
| 360 | meta_decryptor_ = crypto_ctx_.meta_decryptor_factory(); |
| 361 | if (meta_decryptor_) { |
| 362 | ARROW_DCHECK(!meta_decryptor_->file_aad().empty()); |
| 363 | data_page_header_aad_ = encryption::CreateModuleAad( |
| 364 | meta_decryptor_->file_aad(), encryption::kDataPageHeader, |
| 365 | crypto_ctx_.row_group_ordinal, crypto_ctx_.column_ordinal, kNonPageOrdinal); |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | void SerializedPageReader::UpdateDecryption(Decryptor* decryptor, int8_t module_type, |
| 371 | std::string* page_aad) { |
nothing calls this directly
no test coverage detected