diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-02-18 21:56:02 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-02-18 22:17:41 +0000 |
commit | a3219b24a8ea4699e7b04cf1f1131aade9fcd855 (patch) | |
tree | df3d4cc515e6a02203e8560ff881351daf48111d /src/crypto/md5.c | |
parent | 5de8305febf0fe4f2b8a89753cefdfedc519cee2 (diff) | |
download | ipxe-a3219b24a8ea4699e7b04cf1f1131aade9fcd855.tar.gz |
[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/md5.c')
-rw-r--r-- | src/crypto/md5.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/crypto/md5.c b/src/crypto/md5.c index 1fed24fcd..76fb8a697 100644 --- a/src/crypto/md5.c +++ b/src/crypto/md5.c @@ -167,8 +167,7 @@ static void md5_init(void *context) mctx->byte_count = 0; } -static void md5_update(void *context, const void *data, void *dst __unused, - size_t len) +static void md5_update(void *context, const void *data, size_t len) { struct md5_ctx *mctx = context; const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); @@ -224,12 +223,12 @@ static void md5_final(void *context, void *out) memset(mctx, 0, sizeof(*mctx)); } -struct crypto_algorithm md5_algorithm = { +struct digest_algorithm md5_algorithm = { .name = "md5", .ctxsize = MD5_CTX_SIZE, .blocksize = ( MD5_BLOCK_WORDS * 4 ), .digestsize = MD5_DIGEST_SIZE, .init = md5_init, - .encode = md5_update, + .update = md5_update, .final = md5_final, }; |