summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-03-11 17:53:03 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-12 07:58:24 +0100
commit804fae5d16c8c48c6fca8d54f2878a2e382a0bc2 (patch)
treeba56426830aef6a3ca7b5c1d2a9b808ae5361b8f /crypto
parent1ac61317c64f8fda2ab533200dffce5fd3edcbf6 (diff)
downloadbarebox-804fae5d16c8c48c6fca8d54f2878a2e382a0bc2.tar.gz
barebox-804fae5d16c8c48c6fca8d54f2878a2e382a0bc2.tar.xz
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 <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/digest.c6
1 files changed, 3 insertions, 3 deletions
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)