Re: How to emulate password generation in PHP with PlpgSQL?

Поиск
Список
Период
Сортировка
От Josh Kupershmidt
Тема Re: How to emulate password generation in PHP with PlpgSQL?
Дата
Msg-id AANLkTimoyVeLN3if3C97OGIA_bAjupd4HDI5X5ZYLGuq@mail.gmail.com
обсуждение исходный текст
Ответ на How to emulate password generation in PHP with PlpgSQL?  (Andre Lopes <lopes80andre@gmail.com>)
Список pgsql-general
On Sun, Jun 13, 2010 at 8:45 AM, Andre Lopes <lopes80andre@gmail.com> wrote:

> But I'am not getting how to generate the SALT. Can someone give me a clue on
> how to do this.

The salt() function you posted returns 10 random hexadecimal digits.
You could mimic it with something like:
SELECT substr(md5(RANDOM()::text), 0, 11);

Josh

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

Предыдущее
От: Alan Hodgson
Дата:
Сообщение: Re: Backups / replication
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: GSS Authentication