umac_ctx
mac->umac_ctx = NULL;
if ((mac->umac_ctx = umac_new(mac->key)) == NULL)
if ((mac->umac_ctx = umac128_new(mac->key)) == NULL)
umac_update(mac->umac_ctx, data, datalen);
umac_final(mac->umac_ctx, u.m, nonce);
umac128_update(mac->umac_ctx, data, datalen);
umac128_final(mac->umac_ctx, u.m, nonce);
if (mac->umac_ctx != NULL)
umac_delete(mac->umac_ctx);
if (mac->umac_ctx != NULL)
umac128_delete(mac->umac_ctx);
mac->umac_ctx = NULL;
struct umac_ctx *umac_ctx;
} umac_ctx;
int umac_reset(struct umac_ctx *ctx)
int umac_delete(struct umac_ctx *ctx)
ctx = (struct umac_ctx *)ctx->free_ptr;
struct umac_ctx *umac_new(const u_char key[])
struct umac_ctx *ctx, *octx;
ctx = (struct umac_ctx *)((u_char *)ctx + bytes_to_add);
int umac_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8])
int umac_update(struct umac_ctx *ctx, const u_char *input, long len)
int umac(struct umac_ctx *ctx, u_char *input,
struct umac_ctx *umac128_new(const u_char key[]);
int umac128_update(struct umac_ctx *ctx, const u_char *input, long len);
int umac128_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
int umac128_delete(struct umac_ctx *ctx);
struct umac_ctx *umac_new(const u_char key[]);
int umac_reset(struct umac_ctx *ctx);
int umac_update(struct umac_ctx *ctx, const u_char *input, long len);
int umac_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
int umac_delete(struct umac_ctx *ctx);
int umac(struct umac_ctx *ctx, u_char *input,