eZ Community » Forums » Developer » Documentation not correct for md5...

Documentation not correct for md5 hashing?

Documentation not correct for md5 hashing?

Friday 22 September 2006 1:50:36 pm - 7 replies

According to hash_type in site.ini and documentation for md5_user, the password_hash is generated by concatenating login, password, but this can not be. I testet to make an md5 hash out of my login+pass, but they don't match my password_hash in the ezuser table.

Why? Is there anything missing in the docs here, or does md5_user contain more values to hash?

Modified on Friday 22 September 2006 1:52:35 pm by K259

Friday 22 September 2006 2:18:45 pm

Hi K259

Google is definitely your friend. As my Perl knowledge is rudimentary at best I don't know how useful these tips are, but this is a common problem.


There is no such thing as incompatibility between different implementation of MD5. There only one MD5 in the world. Probably, you want to $digest = $ctx->hexdigest; in perl.

(No clue what it means, I hope it helps you)

Greetings from Luxembourg


Friday 22 September 2006 2:21:16 pm

Hi K

$str = md5( "$user\n$password" );

$str = md5( "$user\n$password\n$site" );

$str = md5( $password );

(taken from kernel/classes/datatypes/ezuser/ezuser.php)

Friday 22 September 2006 2:26:48 pm

$str = md5( "$user\n$password\n$site" );

What if I got a letter ö in the SiteName under settings/site.ini.

I have a sql-statement which don't take this variable because there's an error on the site variabel.

I tried: $str = md5( "$user\n$password\n"xxxöxxx"" ); But I can't enter this ö in the script (VI editor), it won't allow me.

Any ideas how I can get around this? When SiteName contains unsupportet letters..?


Modified on Friday 22 September 2006 2:27:14 pm by K259

Friday 22 September 2006 2:38:43 pm

Hello K259

This seems to depend on the database or on the character set used.
SELECT MD5( 'ö testing' ) worked fine for me on a utf8 website with utf8 database.

I think if you cannot use the md5 function of SQL with your setup you have to persevere and your perl to produce a php type md5 string. Then there should not be a problem as the md5 contains only 'legal' characters.


Friday 22 September 2006 2:59:31 pm

Hi Claudia!

Does select æ work?

Friday 22 September 2006 3:37:14 pm


Friday 22 September 2006 5:36:46 pm

Hi Claudia

Could you contact me outside these forums?
My email: paul [dot] borgermans [at] gmail [dot] com

Have a nice weekend



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from