Re: MD5 in pg and php

Поиск
Список
Период
Сортировка
От Joolz
Тема Re: MD5 in pg and php
Дата
Msg-id 20040429081530.GA8282@localhost.localdomain
обсуждение исходный текст
Ответ на Re: MD5 in pg and php  (Marek Lewczuk <newsy@lewczuk.com>)
Ответы Re: MD5 in pg and php  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: MD5 in pg and php  ("Stefan Sturm" <mailling@anrath.info>)
Re: MD5 in pg and php  (Nick Barr <nicky@chuckie.co.uk>)
Re: MD5 in pg and php  (Marek Lewczuk <newsy@lewczuk.com>)
Список pgsql-php
> [Marek Lewczuk schreef op 29-04-2004 09:31 +0100]
>
> Joolz wrote:
> >Hi, I'm completely new to hashing, so please bear with me.
> >
> >I want to store passwords in a pg db, MD5 seems like a good way to
> >enhance security (no more plaintext passwords over the line etc.) I
> >had a look at MD5, in PHP 4.3.4 there is a function md5() which seems
> >to work nicely:
> >
> >  echo md5('apple');
> >
> >returns ae6d32585ecc4d33cb8cd68a047d8434 every time. Apart from the
> >PHP frontend, I also want to be able to use the same algorithm in
> >native pg. I found that postgresql-contrib-7.3.4 has a function
> >crypt() which I expected to work the same. However:
> >
> >  select crypt('apple', gen_salt('md5'));
> >
> >gives values different from the PHP md5() function, and moreover,
> >they're different each time. Can anyone please tell me what I should
> >do to get the same result in native pg as in PHP?
> >
> >Thanks!
> >
>
> I whould suggest to update PG to version 7.4, where there is built-in
> MD5 function.

Thanks, I already found some fc1 rpm's (still in development). But can
anyone tell me if the 7.4 internal md5() function will do the same as
the PHP md5() function? Or do a quick select md5('apple') and let me
know if the result is 'ae6d32585ecc4d33cb8cd68a047d8434'?

I really wouldn't like to upgrade from my current stable situation,
only to find out that it didn't solve my original problem.

TIA!

--
10:14-10:15
Fedora Core release 1 (Yarrow) Linux 2.4.22-1.2188.nptl

В списке pgsql-php по дате отправления:

Предыдущее
От: Marek Lewczuk
Дата:
Сообщение: Re: MD5 in pg and php
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: MD5 in pg and php