/* -*-c-*-
*
- * $Id: hmac.h,v 1.3 2000/06/17 11:23:57 mdw Exp $
+ * $Id: hmac.h,v 1.4 2000/10/15 19:09:20 mdw Exp $
*
* Generic code for HMAC and NMAC
*
/*----- Revision history --------------------------------------------------*
*
* $Log: hmac.h,v $
+ * Revision 1.4 2000/10/15 19:09:20 mdw
+ * Support HMAC mode for hash functions which need to store more state than
+ * the hash output size.
+ *
* Revision 1.3 2000/06/17 11:23:57 mdw
* New key size interface.
*
/* --- An HMAC or NMAC key --- */ \
\
typedef struct pre##_mackey { \
- octet ochain[PRE##_HASHSZ]; /* Chaining for outer hash */ \
+ octet ochain[PRE##_STATESZ]; /* Chaining for outer hash */ \
unsigned ocount; /* Byte count for outer hash */ \
- octet ichain[PRE##_HASHSZ]; /* Chaining for inner hash */ \
+ octet ichain[PRE##_STATESZ]; /* Chaining for inner hash */ \
unsigned icount; /* Byte count for inner hash */ \
} pre##_mackey; \
\
\
typedef struct pre##_macctx { \
pre##_ctx ctx; /* Context for main hashing */ \
- octet chain[PRE##_HASHSZ]; /* Chaining for outer hash */ \
+ octet chain[PRE##_STATESZ]; /* Chaining for outer hash */ \
unsigned count; /* Byte count for outer hash */ \
} pre##_macctx; \
\