summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/pgcrypto.h
diff options
context:
space:
mode:
authorBruce Momjian2001-08-21 00:42:41 +0000
committerBruce Momjian2001-08-21 00:42:41 +0000
commit2518e273340406033e65816cff6380e20860af0e (patch)
tree48a8bfa1342f8b2fc088e0d8f0fb4bcdaf8bd583 /contrib/pgcrypto/pgcrypto.h
parent5950a984a7478ff877c89632b3792498a38d0c70 (diff)
/contrib/pgcrypto:
* remove support for encode() as it is in main tree now * remove krb5.c * new 'PX library' architecture * remove BSD license from my code to let the general PostgreSQL one to apply * md5, sha1: ANSIfy, use const where appropriate * various other formatting and clarity changes * hmac() * UN*X-like crypt() - system or internal crypt * Internal crypt: DES, Extended DES, MD5, Blowfish crypt-des.c, crypt-md5.c from FreeBSD crypt-blowfish.c from Solar Designer * gen_salt() for crypt() - Blowfish, MD5, DES, Extended DES * encrypt(), decrypt(), encrypt_iv(), decrypt_iv() * Cipher support in mhash.c, openssl.c * internal: Blowfish, Rijndael-128 ciphers * blf.[ch], rijndael.[ch] from OpenBSD * there will be generated file rijndael-tbl.inc. Marko Kreen
Diffstat (limited to 'contrib/pgcrypto/pgcrypto.h')
-rw-r--r--contrib/pgcrypto/pgcrypto.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/contrib/pgcrypto/pgcrypto.h b/contrib/pgcrypto/pgcrypto.h
index 1700b89b158..4c400243042 100644
--- a/contrib/pgcrypto/pgcrypto.h
+++ b/contrib/pgcrypto/pgcrypto.h
@@ -26,27 +26,24 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pgcrypto.h,v 1.3 2001/03/22 03:59:10 momjian Exp $
+ * $Id: pgcrypto.h,v 1.4 2001/08/21 00:42:41 momjian Exp $
*/
#ifndef _PG_CRYPTO_H
#define _PG_CRYPTO_H
-typedef struct _pg_digest pg_digest;
-struct _pg_digest
-{
- char *name;
- uint (*length) (pg_digest * h);
- uint8 *(*digest) (pg_digest * h, uint8 *data,
- uint dlen, uint8 *buf);
- /* private */
- union
- {
- uint code;
- const void *ptr;
- } misc;
-};
-
-extern pg_digest *pg_find_digest(pg_digest * hbuf, char *name);
+/* exported functions */
+Datum pg_digest(PG_FUNCTION_ARGS);
+Datum pg_digest_exists(PG_FUNCTION_ARGS);
+Datum pg_hmac(PG_FUNCTION_ARGS);
+Datum pg_hmac_exists(PG_FUNCTION_ARGS);
+Datum pg_gen_salt(PG_FUNCTION_ARGS);
+Datum pg_crypt(PG_FUNCTION_ARGS);
+Datum pg_encrypt(PG_FUNCTION_ARGS);
+Datum pg_decrypt(PG_FUNCTION_ARGS);
+Datum pg_encrypt_iv(PG_FUNCTION_ARGS);
+Datum pg_decrypt_iv(PG_FUNCTION_ARGS);
+Datum pg_cipher_exists(PG_FUNCTION_ARGS);
#endif
+