| 325 | } |
| 326 | |
| 327 | void init(Optional<BlobGranuleCipherKeysCtx> cipherKeysCtx, Arena& arena) { |
| 328 | if (encryptHeaderRef.present()) { |
| 329 | CODE_PROBE(true, "reading encrypted chunked file"); |
| 330 | ASSERT(cipherKeysCtx.present()); |
| 331 | |
| 332 | decrypt(cipherKeysCtx.get(), *this, arena); |
| 333 | } else { |
| 334 | if (BG_ENCRYPT_COMPRESS_DEBUG) { |
| 335 | TraceEvent("IndexBlockSize").detail("Sz", buffer.size()); |
| 336 | } |
| 337 | |
| 338 | ObjectReader dataReader(buffer.begin(), IncludeVersion()); |
| 339 | dataReader.deserialize(FileIdentifierFor<IndexBlock>::value, block, arena); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | void finalize(Optional<BlobGranuleCipherKeysCtx> cipherKeysCtx, Arena& arena) { |
| 344 | if (cipherKeysCtx.present()) { |
no test coverage detected