You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
postgres/contrib/pgcrypto
Tom Lane 7a4cc54e58 Eliminate some of the more blatant platform-dependencies ... it builds here now, anyway ... 25 years ago
..
Makefile Hashing functions from Marko Kreen <marko@l-t.ee> 26 years ago
README.pgcrypto Hashing functions from Marko Kreen <marko@l-t.ee> 26 years ago
internal.c Hashing functions from Marko Kreen <marko@l-t.ee> 26 years ago
krb.c Hashing functions from Marko Kreen <marko@l-t.ee> 26 years ago
md5.c Eliminate some of the more blatant platform-dependencies ... it builds here now, anyway ... 25 years ago
md5.h Eliminate some of the more blatant platform-dependencies ... it builds here now, anyway ... 25 years ago
mhash.c Hashing functions from Marko Kreen <marko@l-t.ee> 26 years ago
openssl.c Hashing functions from Marko Kreen <marko@l-t.ee> 26 years ago
pgcrypto.c Revise handling of oldstyle/newstyle functions per recent discussions 25 years ago
pgcrypto.h Hashing functions from Marko Kreen <marko@l-t.ee> 26 years ago
pgcrypto.sql.in Revise handling of oldstyle/newstyle functions per recent discussions 25 years ago
sha1.c Eliminate some of the more blatant platform-dependencies ... it builds here now, anyway ... 25 years ago
sha1.h Eliminate some of the more blatant platform-dependencies ... it builds here now, anyway ... 25 years ago

README.pgcrypto


DESCRIPTION

Here is a implementation of crypto hashes for PostgreSQL.
It exports 2 functions to SQL level:

digest(data::text, hash_name::text)
which returns hexadecimal coded hash over data by
specified algorithm. eg

> select digest('blah', 'sha1');
5bf1fd927dfb8679496a2e6cf00cbe50c1c87145

digest_exists(hash_name::text)::bool
which reports if particular hash type exists.

If any of arguments are NULL they return NULL.

HASHES

For choosing library you must edit Makefile.

standalone (default):
MD5, SHA1

(the code is from KAME project. Actually I hate code
duplication, but I also want to quarantee that MD5 and
SHA1 exist)

mhash (0.8.1):
MD5, SHA1, CRC32, CRC32B, GOST, TIGER, RIPEMD160,
HAVAL(256,224,192,160,128)

openssl:
MD5, SHA1, RIPEMD160, MD2

kerberos5 (heimdal):
MD5, SHA1