From 92d64cb553c434fbe6b5d2d50f3e7da356bcd8e6 Mon Sep 17 00:00:00 2001 From: mdw Date: Sat, 17 Jun 2000 11:22:17 +0000 Subject: [PATCH] Minor changes in the generic hash interface. --- ghash.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ghash.h b/ghash.h index 9cee338..762444c 100644 --- 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. * @@ -48,24 +51,20 @@ /*----- 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; -- 2.11.0