summaryrefslogtreecommitdiff
path: root/umac32.c
diff options
context:
space:
mode:
Diffstat (limited to 'umac32.c')
-rw-r--r--umac32.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/umac32.c b/umac32.c
index 98f987e9..ce859c15 100644
--- a/umac32.c
+++ b/umac32.c
@@ -101,8 +101,11 @@ umac32_digest (struct umac32_ctx *ctx,
}
assert (ctx->count > 0);
if ( !(ctx->nonce_low & _UMAC_NONCE_CACHED))
- aes_encrypt (&ctx->pdf_key, AES_BLOCK_SIZE,
- (uint8_t *) ctx->pad_cache, ctx->nonce);
+ {
+ aes_encrypt (&ctx->pdf_key, AES_BLOCK_SIZE,
+ (uint8_t *) ctx->pad_cache, ctx->nonce);
+ ctx->nonce_low |= _UMAC_NONCE_CACHED;
+ }
pad = ctx->pad_cache[ctx->nonce_low & 3];