Thread: MD5() function not available ??

MD5() function not available ??

From
"Marek Lewczuk"
Date:
Hey,
I've searched for MD5 crypting function in PG, but I did not find it.
Anyone knows how to implement this function in PG ?

Best wishes,
Marek L.


Re: MD5() function not available ??

From
Dennis Bjorklund
Date:
On Thu, 11 Sep 2003, Marek Lewczuk wrote:

> I've searched for MD5 crypting function in PG, but I did not find it.
> Anyone knows how to implement this function in PG ?

It's implemented in the pgcrypto module that is in contrib in the tarball.
Once you have added that you can for example do

dennis=# SELECT encode (digest ('the string', 'md5'), 'hex');
 44d5a3f30f0328e0cf60cd275ed3aac9

--
/Dennis