From cde0a7fa6fa57a02ba9921e34a590085a6690e6e Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 17 Mar 2010 13:31:59 +0100 Subject: Corrected make clean, and corrected examples to use the current cryptodev.h definitions. --- examples/Makefile | 3 +++ examples/hmac.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/Makefile b/examples/Makefile index eb50a5f..601fb07 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -7,3 +7,6 @@ example-hmac-objs := hmac.o check: $(hostprogs) ./cipher ./hmac + +clean: + rm -f *.o *~ hmac cipher diff --git a/examples/hmac.c b/examples/hmac.c index e652c1e..9975792 100644 --- a/examples/hmac.c +++ b/examples/hmac.c @@ -15,6 +15,7 @@ #define DATA_SIZE 4096 #define BLOCK_SIZE 16 #define KEY_SIZE 16 +#define SHA1_HASH_LEN 20 static int test_crypto(int cfd) @@ -28,8 +29,8 @@ test_crypto(int cfd) } data; struct session_op sess; struct crypt_op cryp; - uint8_t mac[HASH_MAX_LEN]; - uint8_t oldmac[HASH_MAX_LEN]; + uint8_t mac[AALG_MAX_RESULT_LEN]; + uint8_t oldmac[AALG_MAX_RESULT_LEN]; uint8_t md5_hmac_out[] = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38"; uint8_t sha1_out[] = "\x8f\x82\x03\x94\xf9\x53\x35\x18\x20\x45\xda\x24\xf3\x4d\xe5\x2b\xf8\xbc\x34\x32"; int i; -- cgit