Link to home
Create AccountLog in
Avatar of DidiahProd

asked on

How do I use PasswordSalt and MD5 hashing in formsauthentication- based on a php salt

I'm migrating a vbulletin php application into an application.  I have passwords that were created using the following code:

$phphashedpassword = md5(md5(password) + salt) ;

now i have an md5 based password and hex driven salt.

How do i authenticate with these parameters using formsauthenticaiton?
the following code doesn't work:

Dim saltAndPwd As String = String.Concat(clearpassword, salt)
hashedpassword = FormsAuthentication.HashPasswordForStoringInConfigFile(saltAndPwd, "md5").ToLower

in my opinion, hashedpassword should be the same as $phphashedpassword.

Avatar of DropZone
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
FormsAuthentication.HashPasswordForStoringInConfigFile(FormsAuthentication.HashPasswordForStoringInConfigFile(clearpassword, "md5") + salt, "md5")