mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
d08741eab5
are now separate files "postgres.h" and "postgres_fe.h", which are meant to be the primary include files for backend .c files and frontend .c files respectively. By default, only include files meant for frontend use are installed into the installation include directory. There is a new make target 'make install-all-headers' that adds the whole content of the src/include tree to the installed fileset, for use by people who want to develop server-side code without keeping the complete source tree on hand. Cleaned up a whole lot of crufty and inconsistent header inclusions. |
||
---|---|---|
.. | ||
encode.c | ||
encode.h | ||
internal.c | ||
krb.c | ||
Makefile | ||
md5.c | ||
md5.h | ||
mhash.c | ||
openssl.c | ||
pgcrypto.c | ||
pgcrypto.h | ||
pgcrypto.sql.in | ||
README.pgcrypto | ||
sha1.c | ||
sha1.h |
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