calculating the MD5 hash of role passwords in C

From: Matthias Apitz <guru(at)unixarea(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: calculating the MD5 hash of role passwords in C
Date: 2020-01-22 18:20:36
Message-ID: 20200122182036.GA2908@c720-r342378
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

If I look into the database I see:

sisis71=# select rolname, rolpassword from pg_authid where rolname = 'sisis';
rolname | rolpassword
---------+-------------------------------------
sisis | md52f128a1fbbecc4b16462e8fc8dda5cd5

I know the clear text password of the role, it is simple 'sisis123', how
could I calculate the above MD5 hash from the clear text password, for
example in C? Which salt is used for the crypt(3) function?

Thanks

matthias
--
Matthias Apitz, ✉ guru(at)unixarea(dot)de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-01-22 18:35:49 Re: calculating the MD5 hash of role passwords in C
Previous Message Adrian Klaver 2020-01-22 16:14:51 Re: PostgresSQL 10 on remote server - Socket is not connected (0x00002749/10057)