postgres/contrib/pgcrypto
Bruce Momjian 558fae16e3 The attached patch enables the contrib subtree to build cleanly under
Cygwin with the possible exception of mSQL-interface.  Since I don't
have mSQL installed, I skipped this tool.

Except for dealing with a missing getopt.h (oid2name) and HUGE (seg),
the bulk of the patch uses the standard PostgreSQL approach to deal with
Windows DLL issues.

I tested the build aspect of this patch under Cygwin and Linux without
any ill affects.  Note that I did not actually attempt to test the code
for functionality.

The procedure to apply the patch is as follows:

    $ # save the attachment as /tmp/contrib.patch
    $ # change directory to the top of the PostgreSQL source tree
    $ patch -p0 </tmp/contrib.patch

Jason
2001-06-18 21:38:02 +00:00
..
encode.c Well, the correct code - that corresponds to current 2001-05-15 04:45:15 +00:00
encode.h pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
internal.c pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
krb.c pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Makefile The attached patch enables the contrib subtree to build cleanly under 2001-06-18 21:38:02 +00:00
md5.c pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
md5.h pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
mhash.c pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
openssl.c pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
pgcrypto.c pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
pgcrypto.h pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
pgcrypto.sql.in I would like to do a interface change in pgcrypto. (Good 2001-01-24 03:46:16 +00:00
README.pgcrypto Documentation update from Marko Kreen. 2001-03-16 17:42:56 +00:00
sha1.c pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
sha1.h pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00

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.