The most “standard” way of generating a signature for a web hook callback request is to hash the payload that’s being sent, together with a secret, and have the receiving party do the same process and compare if the signature in the header coincides with their result.
My question is: why do we need to hash the payload? Is there any security benefit of doing this?
Why can’t we just send them another value in the headers instead of having them have to figure out a way to hash a potentially complex object in such a way that’s compatible across multiple programming languages?
i.e. Would there be a security vulnerability in sending for example, a random string in the headers + the signature in a separate field in the header, and have the receiving party hash the random string with the secret and check if the result coincides?