projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge fix from other branch.
[u/mdw/catacomb]
/
gmac.h
diff --git
a/gmac.h
b/gmac.h
index
9471308
..
1a89be9
100644
(file)
--- a/
gmac.h
+++ b/
gmac.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: gmac.h,v 1.
1 1999/12/10 23:16:01
mdw Exp $
+ * $Id: gmac.h,v 1.
2 2000/06/17 11:22:46
mdw Exp $
*
* Generic MAC function interface
*
*
* Generic MAC function interface
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: gmac.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: gmac.h,v $
+ * Revision 1.2 2000/06/17 11:22:46 mdw
+ * Minor changes in the generic hash and MAC interfaces.
+ *
* Revision 1.1 1999/12/10 23:16:01 mdw
* Generic interface.
*
* Revision 1.1 1999/12/10 23:16:01 mdw
* Generic interface.
*
@@
-46,6
+49,10
@@
#include <stddef.h>
#include <stddef.h>
+#ifndef CATACOMB_GCIPHER_H
+# include "gcipher.h"
+#endif
+
#ifndef CATACOMB_GHASH_H
# include "ghash.h"
#endif
#ifndef CATACOMB_GHASH_H
# include "ghash.h"
#endif
@@
-57,13
+64,15
@@
typedef struct gmac {
} gmac;
typedef struct gmac_ops {
} gmac;
typedef struct gmac_ops {
- const struct gc
hash_base *b; /* Pointer to basic information
*/
+ const struct gc
mac *c; /* Pointer to MAC class
*/
ghash *(*init)(gmac */*m*/); /* Create keyed hash instance */
void (*destroy)(gmac */*m*/); /* Destroy MAC key block */
} gmac_ops;
typedef struct gcmac {
ghash *(*init)(gmac */*m*/); /* Create keyed hash instance */
void (*destroy)(gmac */*m*/); /* Destroy MAC key block */
} gmac_ops;
typedef struct gcmac {
- gchash_base b; /* Basic information */
+ const char *name; /* Name of the MAC function */
+ size_t hashsz; /* Size of output hash */
+ const octet *keysz; /* Key size options */
gmac *(*key)(const void */*k*/, size_t /*sz*/); /* Create key */
} gcmac;
gmac *(*key)(const void */*k*/, size_t /*sz*/); /* Create key */
} gcmac;