Integrity & discontinuities

MD5 & CRC32 fingerprints

A fingerprint is a label calculated from every byte in a file. It helps recognize an identical copy even after its name or folder changes.

Reading the result

File MD5 includes tags and images, so editing them changes it too. The FLAC audio signature is different. These fingerprints do not recognize the same song after re-encoding.

Go deeperMethod, limits, verification and sources

FlacCompagnon computes an MD5 and a CRC32 over the complete file bytes. These are useful for comparing copies or identifying an unchanged file after a rename or move. The path is not part of either calculation.

What is included#

Everything in the file contributes: compressed audio, headers, tags, artwork and padding. Updating a title or cover can change both fingerprints without changing the decoded sound. Re-encoding the same audio can also change them.

The FLAC STREAMINFO MD5 is different: it covers unencoded audio samples. It normally survives retagging and lossless re-encoding of the same sample stream. A missing or unverified stored signature must not be treated as verified audio identity.

IdentifierSurvives a simple moveSurvives tag editsMeaning
File MD5 / CRC32YesGenerally noWhole-file bytes
Verified FLAC audio MD5YesYesDecoded audio sample bytes
MusicBrainz IDIf tags are preservedIf the ID is preservedA catalog entity, not byte identity

Matching a saved report#

The JSON report retains paths and the file fingerprints. A consumer can search for matching fingerprints when paths have moved, but the fingerprints do not locate a file automatically. Identical copies have identical hashes; there may be several valid matches. Preserve ambiguity instead of choosing an arbitrary path.

MusicBrainz IDs complement these measurements when supplied by the catalog or tags: they describe recordings or releases, and can be shared by files with different mastering, encoding or content. They should not replace byte comparison.

Limits#

MD5 and CRC32 are practical checksums for accidental changes, not secure authenticity proofs. Collisions are possible, especially for CRC32; MD5 is unsuitable against deliberate collision attacks. These are not perceptual fingerprints and cannot recognize a song across different encodings or edits.

Check manually#

On macOS:

md5 "track.flac"

On Linux:

md5sum "track.flac"

In Windows PowerShell:

Get-FileHash "track.flac" -Algorithm MD5

Compare the hexadecimal digest with the file MD5 in the report, ignoring letter case. Copy the file to another folder and repeat: the digest should be unchanged. Then edit a tag on the copy and compare again; its audio can remain identical while the whole-file MD5 changes.

Integrating the engine in your software?

Browse the Rust API in Rustdoc ↗