ContentDigest.h header

#include <ew/core/ContentDigest.h>

Namespace ew::core

Functions

QString ew::core::text::contentDigest(const QString &text)

The digest of text, for detecting that source text has drifted since something was derived from it.

The general shape of "has this changed since?", which more than one feature needs: a translation goes stale when the sentence it was made from is edited, and a voice-over take needs a pickup when the line the actor read is rewritten. Both are the same question, so both ask it the same way rather than each carrying its own near-identical hash.

Digested as UTF-8 so a given string digests identically on every platform a project can be opened on – the folder format travels between machines through Perforce or Git.

The FULL hex SHA-256, deliberately not truncated: this is written into project files that must stay comparable for years, and a shortened digest trades a collision risk for bytes nobody is counting.