Re: calculating the MD5 hash of role passwords in C

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: calculating the MD5 hash of role passwords in C
Дата
Msg-id 20200123161537.GA31330@squirrel.exwg.net
обсуждение исходный текст
Ответ на Re: calculating the MD5 hash of role passwords in C  (Matthias Apitz <guru@unixarea.de>)
Ответы Re: calculating the MD5 hash of role passwords in C  (Bruce Momjian <bruce@momjian.us>)
Re: calculating the MD5 hash of role passwords in C  (Matthias Apitz <guru@unixarea.de>)
Список pgsql-general
## Matthias Apitz (guru@unixarea.de):

> > The documentation on pg_authid has the details:
> > "The MD5 hash will be of the user's password concatenated to their user name."
> > https://www.postgresql.org/docs/12/catalog-pg-authid.html
> 
> This is still not exactly what I was looking for. But has an interesting
> detail (salting the role password by adding the role name to it). An
> implementation with UNIX crypt(3) for MD5 would need an additional salt
> like '$1$salt' to encrypt 'sisis123sisis'.

It's not crypt(3). It's "the MD5 hash of the user's password concatenated
to their user name".
Try:
perl -MDigest::MD5 -e 'print("md5" . Digest::MD5::md5_hex("sisis123" . "sisis") . "\n");'

Regards,
Christoph

-- 
Spare Space.



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

Предыдущее
От: Igor Neyman
Дата:
Сообщение: RE: calculating the MD5 hash of role passwords in C
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: calculating the MD5 hash of role passwords in C