Content Digest
The content digest signature that is used to validate the HTTP message content. A hashing algorithm is used to create a digest of the message body. With the algorithm you can then rehash the message body and validate it against the pre-computed content-digest.
The content digest should only be computed for requests where message body is present
Generate Content Digest
Although sha-256
generated digests are considered secure, we recommend using sha-512
.
Compute Content Digest
Make Signed Request
In the below example request:
sha-512
: The algorithm used to hash the content messageRK/0...abDg=
: Base64 representation resulting from the hashed content message
Verify Content Digest
Re-compute Content Digest
See Step 1
in Generate Content Digest
We will call this computed-content-digest
.
Compare Digests
Compare computed-content-digest
to the one that was passed along in the original http header (i.e. - header-content-digest
).
header-content-digest
equals RK/08...FabDg=
Verify or Reject
Reject the message, if computed-content-digest
does not equal header-content-digest
.