Thread: crypt in Postgres?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I wonder if there is something like crypt() function in postgtres, which would use standard unix crypt? TIA! Emils -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.2 -- QDPGP 2.61a Comment: http://community.wow.net/grt/qdpgp.html iQA/AwUBOIbZG90sxa1MAPWHEQJYKgCg39FKBZi5zvsJ1XpFL8bPIvuE9HIAoO1+ LrcmsFGeJRi3pdiKmAAFdk1b =yqsL -----END PGP SIGNATURE-----
On Thu, 20 Jan 2000, Emils Klotins wrote: > Hello, I wonder if there is something like crypt() function in > postgtres, which would use standard unix crypt? No, but you can easily write your own. See the chapter on functions in the programmer's guide. -- Peter Eisentraut Sernanders vaeg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
Thus spake Peter Eisentraut > On Thu, 20 Jan 2000, Emils Klotins wrote: > > > Hello, I wonder if there is something like crypt() function in > > postgtres, which would use standard unix crypt? > > No, but you can easily write your own. See the chapter on functions in the > programmer's guide. In fact, see http://www.druid.net/darcy/files/chkpass.tgz for an example of a user type that encrypts it's input. -- D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
On Thu, 20 Jan 2000, Peter Eisentraut wrote: > On Thu, 20 Jan 2000, Emils Klotins wrote: > > > Hello, I wonder if there is something like crypt() function in > > postgtres, which would use standard unix crypt? > > No, but you can easily write your own. See the chapter on functions in the > programmer's guide. Theres a UnixCrypt class in the JDBC driver which you could use. As its all static, its easy to translate to another language. Peter -- Peter T Mount peter@retep.org.uk Main Homepage: http://www.retep.org.uk PostgreSQL JDBC Faq: http://www.retep.org.uk/postgresJava PDF Generator: http://www.retep.org.uk/pdf