Content-Digest
you can use either SHA-256 or SHA-512 algorithm.
The Content-Digest
should be created from the request body.
Having the request body hashed and available as a header allows verification that the content of the request has not been tampered with.
Signature
header of the request.
You also need to create the Signature-Input
header which outlines the parameters and their order that were used to generate the Signature
as well as metadata about the signature.
The metadata should include:
alg
)created
)expires
)keyid
)Content-Digest
header.
Comparing the generated value to the value in Content-Digest
ensures the body of the request has not been tampered with.
Signature-Input
, generate the signature base for the request. You can read more about it here.
Based on the previous example, the signature base would be the following.
Signature-Input
) was in fact signed by pawaPay and therefore originates from pawaPay.