Sha256.cpp provides a small helper to compute the SHA-256 digest of a file.
The function is used during import to assign a stable, unique identifier for
books; this id becomes the primary key in SQLite and the filename for cached
covers.
std::string digest = sha256_file(path);
The caller is responsible for handling I/O errors (the helper throws if the file cannot be read). Since the digest is deterministic, re-importing the same file produces the same id, allowing updates to merge cleanly.