make reinitialisation work for CMAC

This commit is contained in:
Dr. Stephen Henson 2012-04-11 12:26:41 +00:00
parent 5a34fcd76e
commit bbe0c8c5be

View File

@ -151,6 +151,8 @@ int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
return 0;
if (!M_EVP_EncryptInit_ex(&ctx->cctx, NULL, NULL, NULL, zero_iv))
return 0;
memset(ctx->tbl, 0, bl);
ctx->nlast_block = 0;
return 1;
}
/* Initialiase context */