From a3219b24a8ea4699e7b04cf1f1131aade9fcd855 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 18 Feb 2009 21:56:02 +0000 Subject: [crypto] Split crypto_algorithm into {digest,cipher,pubkey}_algorithm The various types of cryptographic algorithm are fundamentally different, and it was probably a mistake to try to handle them via a single common type. pubkey_algorithm is a placeholder type for now. --- src/crypto/hmac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/crypto/hmac.c') diff --git a/src/crypto/hmac.c b/src/crypto/hmac.c index 6884bde9b..be0298a78 100644 --- a/src/crypto/hmac.c +++ b/src/crypto/hmac.c @@ -35,7 +35,7 @@ * @v key Key * @v key_len Length of key */ -static void hmac_reduce_key ( struct crypto_algorithm *digest, +static void hmac_reduce_key ( struct digest_algorithm *digest, void *key, size_t *key_len ) { uint8_t digest_ctx[digest->ctxsize]; @@ -58,7 +58,7 @@ static void hmac_reduce_key ( struct crypto_algorithm *digest, * will be replaced with its own digest, and key_len will be updated * accordingly). */ -void hmac_init ( struct crypto_algorithm *digest, void *digest_ctx, +void hmac_init ( struct digest_algorithm *digest, void *digest_ctx, void *key, size_t *key_len ) { unsigned char k_ipad[digest->blocksize]; unsigned int i; @@ -93,7 +93,7 @@ void hmac_init ( struct crypto_algorithm *digest, void *digest_ctx, * will be replaced with its own digest, and key_len will be updated * accordingly). */ -void hmac_final ( struct crypto_algorithm *digest, void *digest_ctx, +void hmac_final ( struct digest_algorithm *digest, void *digest_ctx, void *key, size_t *key_len, void *hmac ) { unsigned char k_opad[digest->blocksize]; unsigned int i; -- cgit v1.2.3-55-g7522