summaryrefslogtreecommitdiffstats
path: root/examples/hmac.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-03-17 13:31:59 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-03-17 13:31:59 +0100
commitcde0a7fa6fa57a02ba9921e34a590085a6690e6e (patch)
tree005d7ac486c5aecce97f5f423f52bb0e42ae093a /examples/hmac.c
parente8a9364716747bf25feda87f282f95e43a8708a3 (diff)
downloadcryptodev-linux-cde0a7fa6fa57a02ba9921e34a590085a6690e6e.tar.gz
cryptodev-linux-cde0a7fa6fa57a02ba9921e34a590085a6690e6e.tar.xz
cryptodev-linux-cde0a7fa6fa57a02ba9921e34a590085a6690e6e.zip
Corrected make clean, and corrected examples to use the current cryptodev.h
definitions.
Diffstat (limited to 'examples/hmac.c')
-rw-r--r--examples/hmac.c5
1 files changed, 3 insertions, 2 deletions
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;