summaryrefslogtreecommitdiffstats
path: root/src/methods/generic_gmac
diff options
context:
space:
mode:
Diffstat (limited to 'src/methods/generic_gmac')
-rw-r--r--src/methods/generic_gmac/generic_gmac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/methods/generic_gmac/generic_gmac.c b/src/methods/generic_gmac/generic_gmac.c
index 5ee8427..30a2f2f 100644
--- a/src/methods/generic_gmac/generic_gmac.c
+++ b/src/methods/generic_gmac/generic_gmac.c
@@ -203,7 +203,7 @@ static bool method_encrypt(fastd_peer_t *peer UNUSED, fastd_method_session_state
put_size(&outblocks[n_blocks], in.len-sizeof(fastd_block128_t));
- ok = session->ghash->hash(session->ghash_state, &tag, outblocks+1, n_blocks);
+ ok = session->ghash->digest(session->ghash_state, &tag, outblocks+1, n_blocks*sizeof(fastd_block128_t));
}
if (!ok) {
@@ -258,7 +258,7 @@ static bool method_decrypt(fastd_peer_t *peer, fastd_method_session_state_t *ses
put_size(&inblocks[n_blocks], in.len-sizeof(fastd_block128_t));
- ok = session->ghash->hash(session->ghash_state, &tag, inblocks+1, n_blocks);
+ ok = session->ghash->digest(session->ghash_state, &tag, inblocks+1, n_blocks*sizeof(fastd_block128_t));
}
if (!ok || memcmp(&tag, &outblocks[0], sizeof(fastd_block128_t)) != 0) {