summaryrefslogtreecommitdiffstats
path: root/crypto/digest.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-03-17 12:53:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-19 07:46:15 +0100
commit92138a77544da7ad7d880082e905c1ca8cd0c527 (patch)
tree4c839672611c982994d1bfd400b718739feb8540 /crypto/digest.c
parentbf2cdf4084721de533ad0957f2ca3002cfa89cf1 (diff)
downloadbarebox-92138a77544da7ad7d880082e905c1ca8cd0c527.tar.gz
barebox-92138a77544da7ad7d880082e905c1ca8cd0c527.tar.xz
crypto: digest: digest_file_window/digest_file/digest_file_by_name drop key params
expect the key to be set before calling Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto/digest.c')
-rw-r--r--crypto/digest.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/crypto/digest.c b/crypto/digest.c
index 2228ec7eb5..208a2041b1 100644
--- a/crypto/digest.c
+++ b/crypto/digest.c
@@ -116,7 +116,6 @@ void digest_free(struct digest *d)
EXPORT_SYMBOL_GPL(digest_free);
int digest_file_window(struct digest *d, const char *filename,
- const unsigned char *key, size_t keylen,
unsigned char *hash,
ulong start, ulong size)
{
@@ -125,9 +124,6 @@ int digest_file_window(struct digest *d, const char *filename,
unsigned char *buf;
int flags = 0;
- if (key)
- digest_set_key(d, key, keylen);
-
ret = digest_init(d);
if (ret)
return ret;
@@ -194,7 +190,6 @@ out:
EXPORT_SYMBOL_GPL(digest_file_window);
int digest_file(struct digest *d, const char *filename,
- const unsigned char *key, size_t keylen,
unsigned char *hash)
{
struct stat st;
@@ -205,12 +200,11 @@ int digest_file(struct digest *d, const char *filename,
if (ret < 0)
return ret;
- return digest_file_window(d, filename, key, keylen, hash, 0, st.st_size);
+ return digest_file_window(d, filename, hash, 0, st.st_size);
}
EXPORT_SYMBOL_GPL(digest_file);
int digest_file_by_name(const char *algo, const char *filename,
- const unsigned char *key, size_t keylen,
unsigned char *hash)
{
struct digest *d;
@@ -220,7 +214,7 @@ int digest_file_by_name(const char *algo, const char *filename,
if (!d)
return -EIO;
- ret = digest_file(d, filename, key, keylen, hash);
+ ret = digest_file(d, filename, hash);
digest_free(d);
return ret;
}