Digest

The HTTP Digest request and response header contained a cryptographic hash of the selected representation of a resource. This header has been deprecated and replaced by Content-Digest and Repr-Digest.

Usage

The Digest header carried a hash value computed over the entire representation of a resource, not over individual transfer-encoded messages. Clients recalculated the hash from the received body and compared the result against the header value to detect transmission errors or tampering.

A client signaled the desire for a digest by sending the Want-Digest request header, listing acceptable algorithms. The server then selected an algorithm and returned the hash in the Digest header.

Deprecated

The Digest and Want-Digest headers are deprecated. The modern replacement specification defines Content-Digest (hash of the message content) and Repr-Digest (hash of the selected representation) as replacements. New implementations adopt these successor headers.

Values

digest-algorithm

The name of the hashing algorithm used to produce the digest value. Algorithms previously defined include SHA-256, SHA-512, UNIXsum, UNIXcksum, and CRC32c. The MD5, SHA, and adler32 algorithms were deprecated due to known weaknesses.

digest-value

The Base64-encoded output of applying the selected algorithm to the representation data.

The combined syntax follows this pattern:

Digest: <algorithm>=<encoded-value>

Example

A server returns a SHA-512 digest of the resource representation. The client hashes the received body with the same algorithm and compares the output to verify integrity.

Digest: sha-512=O3YaKpqW4cQwI23DE3ijRQ6hia4UScPIrsJc+oslOBZhMXlopUz0a/ztCa5rSfhRKDIYKsLQh7IjgPy3YNgCow==

A SHA-256 digest is shorter and more common in everyday responses. The same verification process applies.

Digest: sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBv7EtIkOF9Y=

Takeaway

The Digest header provided integrity verification for HTTP representations through cryptographic hashing. Content-Digest and Repr-Digest replace this header in modern implementations.

See also

Last updated: March 11, 2026