From c6cce0f5aac6640d5946c7ba7a258a04deac9423 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 20 Nov 2013 02:17:15 +0100 Subject: Replace max_packet_size functions by a max_overhead field --- src/methods/generic_poly1305/generic_poly1305.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/methods/generic_poly1305') diff --git a/src/methods/generic_poly1305/generic_poly1305.c b/src/methods/generic_poly1305/generic_poly1305.c index 588e294..f3d630a 100644 --- a/src/methods/generic_poly1305/generic_poly1305.c +++ b/src/methods/generic_poly1305/generic_poly1305.c @@ -69,10 +69,6 @@ static bool method_provides(const char *name) { return cipher_get(NULL, name, NULL, NULL); } -static size_t method_max_packet_size(fastd_context_t *ctx) { - return (fastd_max_packet_size(ctx) + COMMON_HEADBYTES + crypto_onetimeauth_poly1305_BYTES); -} - static size_t method_key_length(fastd_context_t *ctx, const char *name) { const fastd_cipher_t *cipher = NULL; const fastd_cipher_context_t *cctx; @@ -239,7 +235,7 @@ static bool method_decrypt(fastd_context_t *ctx, fastd_peer_t *peer, fastd_metho const fastd_method_t fastd_method_generic_poly1305 = { .provides = method_provides, - .max_packet_size = method_max_packet_size, + .max_overhead = COMMON_HEADBYTES + crypto_onetimeauth_poly1305_BYTES, .min_encrypt_head_space = AUTHBLOCKS*sizeof(fastd_block128_t), .min_decrypt_head_space = AUTHBLOCKS*sizeof(fastd_block128_t) - crypto_onetimeauth_poly1305_BYTES, .min_encrypt_tail_space = sizeof(fastd_block128_t)-1, -- cgit v1.2.3