Re: PHP MD5 Crypt equivalent in CF?

2009-07-05 Thread Jochem van Dieten
On Fri, Jul 3, 2009 at 3:12 PM, Oli Rosenbladt wrote: On original input in the PHP system, the salt is generated by a unique, 8-digit user code, prepended by $1$ and appended with $ for the 12 digits necessary for MD5 encryption. There is no requirement for a salt being 12 byte. What you

PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread Oli Rosenbladt
Hello, I am trying to use CF to compare a password encrypted with MD5 in PHP using: crypt($password, $user_salt) // where user_salt is a 12-character string like $1$ISzYi6zf$ This results in a string like: $1$ISzYi6zf$prff0mAKPVBHNKOlRradj1 So far, nothing I have tried in CF has allowed me

Re: PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread James Holmes
How did the cf hash() function's output differ from the PHP one? mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/7/3 Oli Rosenbladt o...@row2k.com: Hello, I am trying to use CF to compare a password encrypted with MD5 in PHP using: crypt($password,

Re: PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread Tom Chiverton
On Friday 03 Jul 2009, Oli Rosenbladt wrote: So far, nothing I have tried in CF has allowed me to rebuild the result 34-character string so that I can compare them to what's in the database, ie. You'll have to find out how PHP combines the input with the salt (append ? prepend ? XOR ? ...

Re: PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread Oli Rosenbladt
How did the cf hash() function's output differ from the PHP one? mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/7/3 Oli Rosenbladt o...@row2k.com: Hello, I am trying to use CF to compare a password encrypted with MD5 in PHP using:

Re: PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread Oli Rosenbladt
The CF and PHP hash functions of the same string actually return the same result; it's in combination with the salt that the string changes substantially. ~| Want to reach the ColdFusion community with something they want?

Re: PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread Oli Rosenbladt
when you look at the result of a PHP crypt(string,salt) function that uses MD5, the entire 12-character user salt ends up prepended to the resulting string, which is the one that ends up in the DB, and I am trying to rebuild/compare in CF. So, in PHP: user password: sydney user salt:

Re: PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread Tom Chiverton
On Friday 03 Jul 2009, Oli Rosenbladt wrote: when you look at the result of a PHP crypt(string,salt) function that uses MD5, the entire 12-character user salt ends up prepended to the resulting string, So what calculates the salt ? -- Helping to appropriately deploy killer customized

Re: PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread Oli Rosenbladt
On original input in the PHP system, the salt is generated by a unique, 8-digit user code, prepended by $1$ and appended with $ for the 12 digits necessary for MD5 encryption. The user code is stored in the database, so what I was hoping to do was take the user code, recreate the stored

Re: PHP MD5 Crypt equivalent in CF?

2009-07-03 Thread James Holmes
You need to ask a PHP list how the crypt function applies the salt when MD5ing the input. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/7/3 Oli Rosenbladt o...@row2k.com: On original input in the PHP system, the salt is generated by a unique, 8-digit