Solved

How do I use MD5 and salt to generate a token

Posted on 2008-06-12
3
467 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

733 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