hash function
Moderator: General Moderators
hash function
I have a table which stores user's password. The password is hashed using coldfusion from another application. My problem is, I'm unable to access the password in PHP. I have tried php md5 function to unhash it. Does anyone has fully working code for this?
Re: hash function
You can't "unhash" it. Instead, use md5 or whatever hashing coldfusion uses to compare user input with the stored hashed value.cade wrote:I have tried php md5 function to unhash it.
There are 10 types of people in this world, those who understand binary and those who don't
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: hash function
You shouldn't ever need the password.cade wrote:My problem is, I'm unable to access the password in PHP.
One of the main reasons people use hashes is because they AREN'T supposed to be reversible and they are generally fast. Now depending on the hashing algorithm, that may or may not be true in this case.
To validate the user, you must determine which algorithm was used by ColdFusion to hash the password. Many times this can be identified just by looking at the length of the hashed password.
Once you have identified the hashing algorithm. You can then hash passwords (using the same algorithm in PHP) provided by users and compare the PHP hash to the one stored in the database.
To validate the user, you must determine which algorithm was used by ColdFusion to hash the password. Many times this can be identified just by looking at the length of the hashed password.
Once you have identified the hashing algorithm. You can then hash passwords (using the same algorithm in PHP) provided by users and compare the PHP hash to the one stored in the database.
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland