问题
In Node.js I use following code
hash = crypto.createHmac('sha256', SECRET).update(file).digest('hex');
to calculate HMAC. However Linux command line analog produces different hash code:
> openssl sha256 -hmac "SECRET" file
What is wrong in command line? What are correct arguments?
来源:https://stackoverflow.com/questions/50884630/node-js-crypto-createhmacsha256-command-line-analog