Rob Abernethy IV wrote:
> How does postgres calculate the MD5 version of a password to store in the
> database during user creation? I am trying to set up a postgres JDBCRealm to
> work with Tomcat. The problem is that the resulting digest from Java is
> different then the digest stored in the database for the same word.
>
> clear-text: tomcat
> java: 1b359d8753858b55befa0441067aaed3
> postgres: md5efcc1c51a80be13b59cdb96d758a0184
What did you use as salt? PostgreSQL users the user name as salt.
When I run /contrib/pgcrypto's MD5 I get the same value as PostgreSQL.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073