HTTP headers | Digest

The Digest HTTP header is a response HTTP header that provides the requested resource with a small value generated by a hash function from a whole message. The Digest HTTP header is a response header that provides a digest of the requested resource. The entire representation is used to calculate the digest. Multiple digest values for a single resource is also possible as the representation depends on Content-Type and Content-Encoding.

Syntax:

Digest:<digest-algorithm>=<digest-value>

Directives: This header accepts two directives as mentioned above and described below:



  • <digest-algorithm>: It contains defined supported algorithms, example SHA-256 and SHA-512.
  • <digest-value>: It holds the result of encoding and applying the digest algorithm to the resource representation.

Examples:

  • It provides the resource with the sha-256 algorithm and also provides the digest value.
    Digest: sha-256=nOJRJgeeksforgeeksN3OWDUo9DBPE=
  • It provides the resource with the sha-512 algorithm and also provides the digest value. In addition to that, it provides UNIX sum algorithm which is subject to collisions.
    Digest: sha-512=\vdtgeeksforgeeks8nOJRJN3OWDDBPE=, unixsum=69

Supported Browsers: The browsers are compatible with HTTP Digest header are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.