Solved

How do I use MD5 and salt to generate a token

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

Independent Software Vendors: 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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

691 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