Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 13, 2010 at 8:45 AM, Andre Lopes <lopes80andre@xxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux