Re: Data Encryption in PostgreSQL, and a Tutorial.

Berend Tober <btober@computer.org>

From: <btober@computer.org>
To: <dbadekas@aia.gr>
Cc: <pgsql-general@postgresql.org>
Date: 2004-05-11T15:59:21Z
Lists: pgsql-general
> Dias Bantekas wrote:
>
>> does any one know how to get an md5()-like hash function using
>> pgcrypto for postgresql 7.3 ? without upgrading to 7.4
>>
>> Thanks for any input.
>
> SELECT encode(digest(v_password, 'md5'), 'hex');

BTW,

/usr/share/pgsql/contrib/pgcrypto.sql

is the script that defines the encode and digest functions.

--Berend Tober