Verify log export integrity for a PDF platform
23 May 2026
Compare the export with a trusted baseline. A row count, a sequence check and a file digest answer three different questions about what changed.
Consider a small CSV with a header and five event IDs numbered E01 through E05 in order. Keep the original and remove the E03 row from a copy. The deliberate change gives the reviewer something definite to find.
Run the three checks on the same files
| Check | Result in the worked example | What it tells the reviewer |
|---|---|---|
| Count parsed event records | Five in the original, four in the copy | One fewer event row. A count alone cannot identify it, and replacing a row could leave the count unchanged. |
| Compare the ordered identifiers | The copy jumps from E02 to E04 | E03 is absent from this copy. That conclusion depends on knowing the original list or having a documented gap-free sequence. |
| Compare SHA-256 digests | The digests differ | The files differ at byte level. A digest does not identify the row or distinguish an edit from a change of line endings. |
This Python example reproduces the digest check using the exact bytes of each file, including the final newline.
from hashlib import sha256
original = b"event_id\nE01\nE02\nE03\nE04\nE05\n"
review_copy = original.replace(b"E03\n", b"")
print(sha256(original).hexdigest())
print(sha256(review_copy).hexdigest())
Establish what the baseline can prove
Calculate the original digest at export, record the export scope and store the reference separately from the review copy. Someone who can replace both the file and its reference digest could make the pair appear consistent. NIST’s audit-information protection control addresses protecting the underlying audit information against unauthorised change. NIST SP 800-53, AU-9 protection of audit information
Even an exact byte match cannot show that the exporting system logged every event, that its clock was right or that the selected filter covered the intended period. Check the source boundaries and event definition separately. For CSV exports, count parsed records rather than physical lines if fields may contain line breaks.
Record the discrepancy without guessing its cause
Keep the original, its reference digest and the suspect copy. Record the row counts, missing or unexpected IDs, digest comparison and export parameters. If the digest differs but the rows and IDs agree, compare encoding and line endings before attributing the change to a missing event or deliberate tampering.
Part of the PDF editor audit trails: what should a business log record? guide.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
