Re: MD5 salt

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: MD5 salt
Дата
Msg-id 17314.1054217090@sss.pgh.pa.us
обсуждение исходный текст
Ответ на MD5 salt  ("M. Bastin" <marcbastin@mindspring.com>)
Ответы Re: MD5 salt  ("M. Bastin" <marcbastin@mindspring.com>)
Список pgsql-novice
"M. Bastin" <marcbastin@mindspring.com> writes:
> How do I send an MD5 password to pgsql?  (I'm programming my own front-end)
> Pgsql provides a 4-byte 'salt', that you must somehow use with your
> password for MD5.  The trouble is, I don't know how.

Step 1: compute 32-byte MD5 checksum of cleartext password concatenated
with username.  (BTW this checksum, with "md5" on the front, is what is
actually stored in pg_shadow.)

Step 2: compute 32-byte MD5 checksum of the 32-byte result of step 1
concatenated with the 4-byte salt from the server.  Stick "md5" on the
front and send it to the server.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: + operator with a possible NULL operand
Следующее
От: "M. Bastin"
Дата:
Сообщение: OIDs of data types