From b5112ff67f3dd5bb263f5ca6283f170906acaab6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 20 Nov 2013 01:51:12 +0100 Subject: Slightly simplify method/cipher/MAC definitions --- src/crypto/cipher/null/memcpy/null_memcpy.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/crypto/cipher/null/memcpy') diff --git a/src/crypto/cipher/null/memcpy/null_memcpy.c b/src/crypto/cipher/null/memcpy/null_memcpy.c index e3b86ca..c260ffb 100644 --- a/src/crypto/cipher/null/memcpy/null_memcpy.c +++ b/src/crypto/cipher/null/memcpy/null_memcpy.c @@ -31,19 +31,10 @@ static fastd_cipher_context_t* null_initialize(fastd_context_t *ctx UNUSED) { return NULL; } -static size_t null_key_length(fastd_context_t *ctx UNUSED, const fastd_cipher_context_t *cctx UNUSED) { - return 0; -} - - static fastd_cipher_state_t* null_init_state(fastd_context_t *ctx UNUSED, const fastd_cipher_context_t *cctx UNUSED, const uint8_t *key UNUSED) { return NULL; } -static size_t null_iv_length(fastd_context_t *ctx UNUSED, const fastd_cipher_state_t *state UNUSED) { - return 0; -} - static bool null_memcpy(fastd_context_t *ctx UNUSED, const fastd_cipher_state_t *state UNUSED, fastd_block128_t *out, const fastd_block128_t *in, size_t len, const uint8_t *iv UNUSED) { memcpy(out, in, len); return true; @@ -57,13 +48,12 @@ static void null_free(fastd_context_t *ctx UNUSED, fastd_cipher_context_t *cctx const fastd_cipher_t fastd_cipher_null_memcpy = { .name = "memcpy", + .key_length = 0, + .iv_length = 0, .initialize = null_initialize, - - .key_length = null_key_length, .init_state = null_init_state, - .iv_length = null_iv_length, .crypt = null_memcpy, .free_state = null_free_state, -- cgit v1.2.3