From 804fae5d16c8c48c6fca8d54f2878a2e382a0bc2 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 11 Mar 2015 17:53:03 +0100 Subject: digest: introduce digest_{init/update/final/length} This will allow to move from a one at a time digest to a multi-instance with too much impact on the code using it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- crypto/digest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto') diff --git a/crypto/digest.c b/crypto/digest.c index ae414ba5d5..789c0b2fc9 100644 --- a/crypto/digest.c +++ b/crypto/digest.c @@ -84,7 +84,7 @@ int digest_file_window(struct digest *d, char *filename, unsigned char *buf; int flags = 0; - d->init(d); + digest_init(d); fd = open(filename, O_RDONLY); if (fd < 0) { @@ -128,12 +128,12 @@ int digest_file_window(struct digest *d, char *filename, goto out_free; } - d->update(d, buf, now); + digest_update(d, buf, now); size -= now; len += now; } - d->final(d, hash); + digest_final(d, hash); out_free: if (flags) -- cgit v1.2.3