Minor changes in the generic hash interface.
authormdw <mdw>
Sat, 17 Jun 2000 11:22:17 +0000 (11:22 +0000)
committermdw <mdw>
Sat, 17 Jun 2000 11:22:17 +0000 (11:22 +0000)
ghash.h

diff --git a/ghash.h b/ghash.h
index 9cee338..762444c 100644 (file)
--- a/ghash.h
+++ b/ghash.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: ghash.h,v 1.1 1999/12/10 23:16:01 mdw Exp $
+ * $Id: ghash.h,v 1.2 2000/06/17 11:22:17 mdw Exp $
  *
  * Generic hash function interface
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: ghash.h,v $
+ * Revision 1.2  2000/06/17 11:22:17  mdw
+ * Minor changes in the generic hash interface.
+ *
  * Revision 1.1  1999/12/10 23:16:01  mdw
  * Generic interface.
  *
 
 /*----- Generic hash function interface -----------------------------------*/
 
-typedef struct gchash_base {
-  const char *name;                    /* Name of the hash function */
-  size_t hashsz;                       /* Size of output hash */
-} gchash_base;  
-
 typedef struct ghash {
   const struct ghash_ops *ops;         /* Pointer to hash operations */
 } ghash;
 
 typedef struct ghash_ops {
-  const gchash_base *b;                        /* Pointer to basic information */
+  const struct gchash *c;              /* Pointer to hash class */
   void (*hash)(ghash */*h*/, const void */*p*/, size_t /*sz*/); /* Hash */
   void (*done)(ghash */*h*/, void */*buf*/); /* Write result */
   void (*destroy)(ghash */*h*/);       /* Destroy hash block */
 } ghash_ops;
 
 typedef struct gchash {
-  gchash_base b;                       /* Basic bits of information */
+  const char *name;                    /* Name of the hash function */
+  size_t hashsz;                       /* Size of output hash */
   ghash *(*init)(void);                        /* Create a new hash instance */
 } gchash;