From a502fcda45ef5512f19621a1b4e8a46f1371907b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 31 Jan 2007 03:42:07 +0000 Subject: [PATCH] The null crypto algorithm should at least copy data... --- src/crypto/crypto_null.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/crypto/crypto_null.c b/src/crypto/crypto_null.c index 01c67e9f..dda59ea5 100644 --- a/src/crypto/crypto_null.c +++ b/src/crypto/crypto_null.c @@ -22,6 +22,7 @@ * Null crypto algorithm */ +#include #include static void null_init ( void *ctx __unused ) { @@ -34,14 +35,14 @@ static int null_setkey ( void *ctx __unused, void *key __unused, return 0; } -static void null_encode ( void *ctx __unused, const void *src __unused, - void *dst __unused, size_t len __unused ) { - /* Do nothing */ +static void null_encode ( void *ctx __unused, const void *src, + void *dst, size_t len ) { + memcpy ( dst, src, len ); } -static void null_decode ( void *ctx __unused, const void *src __unused, - void *dst __unused, size_t len __unused ) { - /* Do nothing */ +static void null_decode ( void *ctx __unused, const void *src, + void *dst, size_t len ) { + memcpy ( dst, src, len ); } static void null_final ( void *ctx __unused, void *out __unused ) {