eZ Community » Forums » Developer » Creating passwords with md5 - how?

Creating passwords with md5 - how?

Creating passwords with md5 - how?

Friday 22 September 2006 11:02:32 am - 3 replies

I have problems with user import. Don't get the correct hash_value for password_hash in ezuser table. I'm using md5_user for hashing.
my $sql = uu{ update users set password=md5(login + "\n" + password) };
Anyone have an idea?

Friday 22 September 2006 11:33:02 am

Hi K259

I am not exactly sure what programming language your example code is in so here an example if you use PHP and raw SQL commands (without going through EZ)

$password_hash = md5('mylogin' . "\n" . 'foobar');
$query = 'UPDATE ezuser '
. ' SET password_hash = "' . $password_hash . '"'
. ' WHERE login = "mylogin"';

works fine

Greetings from Luxembourg


Friday 22 September 2006 12:07:36 pm

Hi and thanks for your answer!

I'm using perl..the sql statement concatenates login and password, but I get the wrong hash_value for password_hash. Guess I've tried almost everything:
concatenate just password in plaintext, concat login+password in plaintext, concat login,password in plaintext + site + hash_type, but I know the md5_user function I shall use, only concatenate login and password in plaintext, but I don't know why the hash is not correct
sad.gif Emoticon

Friday 22 September 2006 2:23:47 pm

Thread continued here:



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

36 542 Users on board!

Forums menu

Proudly Developed with from