FLAC STREAMINFO can contain an MD5 checksum of the unencoded audio, rather than a checksum of the complete FLAC file. The prescribed reconstructed-sample representation matters to that calculation. A file-level hash can change after a metadata edit while the stored audio checksum remains applicable to exactly the same decoded sample sequence.
Identify the canonical audio bytes
RFC 9639 describes the checksum input as interleaved, signed, little-endian sample data aligned to bytes, with sign extension as required. A WAV file adds container headers and can use another storage representation. Hashing that complete WAV or the original FLAC bytes is therefore not the same calculation, even if both files describe the same audible programme.
Follow a metadata-only edit
Imagine an editor correcting a textual title while leaving all encoded audio unchanged. The FLAC file’s bytes differ, so a whole-file checksum should normally differ too. The unencoded audio values can remain identical. That is a concrete reason for the two checksum results to diverge without treating either as fraudulent or evidence of a changed recording.
Preserve unknown and transformed cases
A zero value in the STREAMINFO checksum field signifies an unknown checksum under the RFC. Separately, resampling, gain processing or another actual sample transformation changes the audio sequence being checked. A maintainer should record whether the checksum was supplied and which decoding or transformation path produced the compared bytes, rather than assume every all-zero field is a successful verification.
Use each check for its stated purpose
An audio checksum can support a bounded decoded-sample comparison; it is not a publisher signature or a whole-file authenticity certificate. A file digest can identify an exact stored object while saying nothing by itself about the canonical decoded audio. Viewers can preserve the checker’s name and exact message. The useful report names algorithm, byte scope, sample representation and file version, allowing a maintainer to explain an expected metadata difference or investigate a real audio mismatch without inventing a safety verdict.
