Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a secure hash of a string using HMAC-SHA256

Status
Not open for further replies.

frumpus

Programmer
Aug 1, 2005
113
US
I have no idea how to do that.

I am supposed to hash a string, along with a secret code (so i guess 2 strings) using the HMAC-SHA256 algorithm.


Any guidance on how to do this would appreciated.
 
I think this link will get you started:


it shows how to do what you need with a file, you just need to adjust it to work with your string instead of a file. I'm pretty sure the "secret code" you mention is the same as the "Key" or "Secret Key" referred to in this article. That's the general concept of keyed cryptography.

I hope that helps. Let me know if you have any trouble getting the function on that MS page to do what you want.

Travis Hawkins
jobs.bestcodingpractices.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top