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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I generate a DES hash in VB? 1

Status
Not open for further replies.

dspitzle

Programmer
Sep 9, 2003
45
US
I'm currently working on a VB interface to a database populated by a PHP application. The PHP application stores a DES hash of user passwords in the database using the crypt() function. Now, I want to compare passwords entered through my VB interface against the hashed passwords in the database, and I've been beating my head against VB.NET's DESCryptoServiceProvider. I can't figure out how to squeeze out a one-way hash from it rather than the reversible encryption results. Can somebody point me towards a solution here? I'm getting headachy.
 
Take a look at section 8.6.1 in this link:

Basically, while DES is a two-way algorithm, the original implementers of crypt() found a way to make it one-way. If you want to generate equivalent password values, you'll need to implement it the same way in .NET

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top