Link to home
Start Free TrialLog in
Avatar of GLlano
GLlano

asked on

How do I use MD5 and salt to generate a token

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.

ASKER CERTIFIED SOLUTION
Avatar of joechina
joechina

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GLlano
GLlano

ASKER

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.
If you key is a string, just do
byte [] keyByte =  System.Text.Encoding.ASCII.GetBytes.GetBytes(key);