?
Solved

How do I use MD5 and salt to generate a token

Posted on 2008-06-12
3
Medium Priority
?
470 Views
Last Modified: 2013-11-07
I'm trying to create a URL that is made up of a set of parameters and a token that is generated using a MD5 hash function.  I'm a beginner at hashing and using salt to generate this token.  I've got the secret key(which i believe is the salt) and the string I need to hash.   I believe that is all I need in order to create my token.  Would you have any suggestions or links on how to generate the token I need?  Please let me know if you need more information.
Thanks.

0
Comment
Question by:GLlano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
joechina earned 1500 total points
ID: 21774007
Check this

http://msdn.microsoft.com/en-us/library/system.security.cryptography.hmacmd5.aspx

But you need to use memorystream instead of filestream in the example.

Good Luck
0
 

Author Comment

by:GLlano
ID: 21774389
The example on the link passes a key array into the constructor of a class.  
ex. Dim myhmacMD5 As New HMACMD5(key)

the example never shows how to create that class or what its doing with the key.  Do you
have any suggestions?

Thanks.
0
 
LVL 13

Expert Comment

by:joechina
ID: 21774666
If you key is a string, just do
byte [] keyByte =  System.Text.Encoding.ASCII.GetBytes.GetBytes(key);
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question