postgresql/contrib/chkpass
D'Arcy J.M. Cain 5f97dc3e7c chkpass_rout returns text so change PG_RETURN_CSTRING to PG_RETURN_TEXT_P.
This is currently a cosmetic difference but I make the change now in case
the macros diverge one day.
2002-08-29 12:18:20 +00:00
..
Makefile To fix the perpetually broken makefiles in the contrib tree, I have 2001-09-06 10:49:30 +00:00
README.chkpass Initial checkin of a contributed type that handles passwords efficiently. 2001-05-03 12:32:13 +00:00
chkpass.c chkpass_rout returns text so change PG_RETURN_CSTRING to PG_RETURN_TEXT_P. 2002-08-29 12:18:20 +00:00
chkpass.sql.in Add a bunch of pseudo-types to replace the behavior formerly associated 2002-08-22 00:01:51 +00:00

README.chkpass

$Header: /cvsroot/pgsql/contrib/chkpass/Attic/README.chkpass,v 1.1 2001/05/03 12:32:13 darcy Exp $

Chkpass is a password type that is automatically checked and converted upon
entry.  It is stored encrypted.  To compare, simply compare agains a clear
text password and the comparison function will encrypt it before comparing.
It also returns an error if the code determines that the password is easily
crackable.  This is currently a stub that does nothing.

I haven't worried about making this type indexable.  I doubt that anyone
would ever need to sort a file in order of encrypted password.

If you precede the string with a colon, the encryption and checking are
skipped so that you can enter existing passwords into the field.

On output, a colon is prepended.  This makes it possible to dump and reload
passwords without re-encrypting them.  If you want the password (encrypted)
without the colon then use the raw() function.  This allows you to use the
type with things like Apache's Auth_PostgreSQL module.

D'Arcy J.M. Cain
darcy@druid.net