News for hackers. Stuff that matters.
Re:Getting started with designing a Secure REST (Web) API by tptacek on Thursday February 16, 2012 @09:16AM (#3598665)
A client creates a unique HMAC (hash) representing it’s request to the server

[CLIENT] Hash (HMAC-SHA1 or SHA256 preferably) the blob of data data (from Step #1) with your private key assigned to you by the system.

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!

HMAC isn't a hash. It's not interchangeable with a hash. HMAC is a MAC. If you try to use a standard hash function to create a MAC, it will blow up in your face. This article is not good, in multiple ways; you should disregard it.

There are no comments on this comment yet.