nicehash/rest-clients-demo

HMAC Signature Calculation

NOCTLJRNE opened this issue · 2 comments

Hi, I'm reading this example overhere https://docs.nicehash.com/main/index.html
Input for signing:
4ebd366d-76f4-4400-a3b6-e51515d054d6 ⊠ 1543597115712 ⊠ 9675d0f8-1325-484b-9594-c9d6d3268890 ⊠ ⊠ da41b3bc-3d0b-4226-b7ea-aee73f94a518 ⊠ ⊠ GET ⊠ /main/api/v2/hashpower/orderBook ⊠ algorithm=X16R&page=0&size=100

Signature is generated via HMAC-SHA256 (input, API_SECRET): 21e6a16f6eb34ac476d59f969f548b47fffe3fea318d9c99e77fc710d2fed798
Then I try to re-create the signature with this tool https://www.freeformatter.com/hmac-generator.html#ad-output, by using the same input & secret, but I can't reproduce it no matter what, can anyone please guide me how to correctly create the HMAC SHA256 signature ? Thank you in advance.

I already found some JS example scripts so I'll close this issue for now, thank you !

@NOCTLJRNE What was the solution?