diff options
| author | Michael Brown | 2009-02-18 22:56:02 +0100 |
|---|---|---|
| committer | Michael Brown | 2009-02-18 23:17:41 +0100 |
| commit | a3219b24a8ea4699e7b04cf1f1131aade9fcd855 (patch) | |
| tree | df3d4cc515e6a02203e8560ff881351daf48111d /src/crypto/hmac.c | |
| parent | [crypto] Move AES_convert_key() hack into axtls_aes.c (diff) | |
| download | ipxe-a3219b24a8ea4699e7b04cf1f1131aade9fcd855.tar.gz ipxe-a3219b24a8ea4699e7b04cf1f1131aade9fcd855.tar.xz ipxe-a3219b24a8ea4699e7b04cf1f1131aade9fcd855.zip | |
[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.
Diffstat (limited to 'src/crypto/hmac.c')
| -rw-r--r-- | src/crypto/hmac.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |
