- djm@cvs.openbsd.org 2013/07/22 12:20:02

[umac.h]
     oops, forgot to commit corresponding header change;
     spotted by jsg and jasper
This commit is contained in:
Damien Miller 2013-07-25 11:55:39 +10:00
parent c331dbd222
commit 94c9cd34d1
2 changed files with 11 additions and 7 deletions

View File

@ -7,6 +7,10 @@
[umac.c] [umac.c]
make MAC key, data to be hashed and nonce for final hash const; make MAC key, data to be hashed and nonce for final hash const;
checked with -Wcast-qual checked with -Wcast-qual
- djm@cvs.openbsd.org 2013/07/22 12:20:02
[umac.h]
oops, forgot to commit corresponding header change;
spotted by jsg and jasper
20130720 20130720
- (djm) OpenBSD CVS Sync - (djm) OpenBSD CVS Sync

14
umac.h
View File

@ -1,4 +1,4 @@
/* $OpenBSD: umac.h,v 1.2 2012/10/04 13:21:50 markus Exp $ */ /* $OpenBSD: umac.h,v 1.3 2013/07/22 12:20:02 djm Exp $ */
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
* *
* umac.h -- C Implementation UMAC Message Authentication * umac.h -- C Implementation UMAC Message Authentication
@ -52,7 +52,7 @@
extern "C" { extern "C" {
#endif #endif
struct umac_ctx *umac_new(u_char key[]); struct umac_ctx *umac_new(const u_char key[]);
/* Dynamically allocate a umac_ctx struct, initialize variables, /* Dynamically allocate a umac_ctx struct, initialize variables,
* generate subkeys from key. * generate subkeys from key.
*/ */
@ -62,10 +62,10 @@ int umac_reset(struct umac_ctx *ctx);
/* Reset a umac_ctx to begin authenicating a new message */ /* Reset a umac_ctx to begin authenicating a new message */
#endif #endif
int umac_update(struct umac_ctx *ctx, u_char *input, long len); int umac_update(struct umac_ctx *ctx, const u_char *input, long len);
/* Incorporate len bytes pointed to by input into context ctx */ /* Incorporate len bytes pointed to by input into context ctx */
int umac_final(struct umac_ctx *ctx, u_char tag[], u_char nonce[8]); int umac_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
/* Incorporate any pending data and the ctr value, and return tag. /* Incorporate any pending data and the ctr value, and return tag.
* This function returns error code if ctr < 0. * This function returns error code if ctr < 0.
*/ */
@ -117,9 +117,9 @@ int uhash(uhash_ctx_t ctx,
#endif #endif
/* matching umac-128 API, we reuse umac_ctx, since it's opaque */ /* matching umac-128 API, we reuse umac_ctx, since it's opaque */
struct umac_ctx *umac128_new(u_char key[]); struct umac_ctx *umac128_new(const u_char key[]);
int umac128_update(struct umac_ctx *ctx, u_char *input, long len); int umac128_update(struct umac_ctx *ctx, const u_char *input, long len);
int umac128_final(struct umac_ctx *ctx, u_char tag[], u_char nonce[8]); int umac128_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
int umac128_delete(struct umac_ctx *ctx); int umac128_delete(struct umac_ctx *ctx);
#ifdef __cplusplus #ifdef __cplusplus