But I can't seem to generate the same hash value.
I'm using the same secret. Encoding is utf-8.
I've insured the order of my body is the same as what is being sent by the webhook.
Here is the method I'm using:
def generateHmac(String secretKey, String data) {
Mac mac = Mac.getInstance("HmacSHA256")
SecretKeySpec secretKeySpec = new SecretKeySpec(secretKey.getBytes(), "HmacSHA256")
mac.init(secretKeySpec)
byte[] hmacBytes = mac.doFinal(data.getBytes("UTF-8"))
return DatatypeConverter.printHexBinary(hmacBytes)
}
I've tried several different variations of this to no effect.
I know you can get different values based on the libraries you use.
Any suggestions as to help resolve this would be great.
Thanks,