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
Bruce Momjian 6099009eae Well, the correct code - that corresponds to current 24 years ago
..
Makefile Changes: 25 years ago
README.pgcrypto Documentation update from Marko Kreen. 25 years ago
encode.c Well, the correct code - that corresponds to current 24 years ago
encode.h pgindent run. Make it all clean. 25 years ago
internal.c pgindent run. Make it all clean. 25 years ago
krb.c pgindent run. Make it all clean. 25 years ago
md5.c pgindent run. Make it all clean. 25 years ago
md5.h pgindent run. Make it all clean. 25 years ago
mhash.c pgindent run. Make it all clean. 25 years ago
openssl.c pgindent run. Make it all clean. 25 years ago
pgcrypto.c pgindent run. Make it all clean. 25 years ago
pgcrypto.h pgindent run. Make it all clean. 25 years ago
pgcrypto.sql.in I would like to do a interface change in pgcrypto. (Good 25 years ago
sha1.c pgindent run. Make it all clean. 25 years ago
sha1.h pgindent run. Make it all clean. 25 years ago

README.pgcrypto


DESCRIPTION

Here are various cryptographic and otherwise useful
functions for PostgreSQL.

encode(data, type)
encodes binary data into ASCII-only representation.
Types supported are 'hex' and 'base64'.

decode(data, type)
decodes the data processed by encode()

digest(data::text, hash_name::text)
which returns cryptographic checksum over data by
specified algorithm. eg

> select encode(digest('blah', 'sha1'), 'hex');
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

ENCRYPTION

There is experimental version out with encryption, HMAC
and UN*X crypt() support in

http://www.l-t.ee/marko/pgsql/

Current latest release is pgcrypto-0.3.tar.gz.