summaryrefslogtreecommitdiffstats
path: root/src/crypto/cipher/null/memcpy/null_memcpy.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-20 01:51:12 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-20 01:51:12 +0100
commitb5112ff67f3dd5bb263f5ca6283f170906acaab6 (patch)
treeb1b3974a9e4ae986c516c53ae723df1c2057974d /src/crypto/cipher/null/memcpy/null_memcpy.c
parent9bb8a04e288d3df817a4328cce9e0ef8f96a0600 (diff)
downloadfastd-b5112ff67f3dd5bb263f5ca6283f170906acaab6.tar
fastd-b5112ff67f3dd5bb263f5ca6283f170906acaab6.zip
Slightly simplify method/cipher/MAC definitions
Diffstat (limited to 'src/crypto/cipher/null/memcpy/null_memcpy.c')
-rw-r--r--src/crypto/cipher/null/memcpy/null_memcpy.c14
1 files changed, 2 insertions, 12 deletions
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,