I came across the following command for unix on binance which I was trying to unpack. See here: https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md
(Section: SIGNED Endpoint Examples for POST /api/v1/order)
openssl dgst -sha256 -hmac
What I understand is it is a call to the openssl command to produce a digest, the digest will be of the sha256 variety as agreed on by standard specs. What I don't understand is the
-hmac flag. What is it and what does it do down to a mathematical level?
My Attempt at Solving the Problem:
I did a google search with
openssl -hmac and
openssl dgst -hmac but the top 10 results were of not avail to me. So I imagine more experienced users would be better to ask.
The flag isnt mentioned in these docs: https://www.mkssoftware.com/docs/man1/openssl_dgst.1.asp and so I'm starting to believe it may have no cryptographic purpose. Although i'm right now not sure.
I found what looks similar to the flag mentioned in This Question: https://stackoverflow.com/questions/7285059/hmac-sha1-in-bash