summaryrefslogtreecommitdiffstats
path: root/include/digest.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-03-11 17:53:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-13 08:32:28 +0100
commit102d59f91fdd327c68c1b7a8c43f3f4685422f52 (patch)
treec000562ea082fd45641872c6b3e016ad3a4852e0 /include/digest.h
parent2f3c3f512b2ff5023a4177e167eb6b55055fe883 (diff)
downloadbarebox-102d59f91fdd327c68c1b7a8c43f3f4685422f52.tar.gz
barebox-102d59f91fdd327c68c1b7a8c43f3f4685422f52.tar.xz
command: add hmac sum supportfor md5, sha1, sha224, sha256, sha384, sha512
pass the key via -h param barebox@barebox sandbox:/ sha256sum -h test /dev/fd0 c297473e9bb221c5dc51d47ad75c76095f1bdc4ca9dff1d5931c2e22bf11a0de /dev/fd0 0x00000000 ... 0xffffffffffffffff use the same idea as openssl command $ openssl dgst -sha256 -hmac "test" TODO HMAC-SHA256(TODO)= c297473e9bb221c5dc51d47ad75c76095f1bdc4ca9dff1d5931c2e22bf11a0de Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/digest.h')
-rw-r--r--include/digest.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/digest.h b/include/digest.h
index a26848c291..fd47a7e248 100644
--- a/include/digest.h
+++ b/include/digest.h
@@ -54,11 +54,14 @@ struct digest *digest_alloc(char* name);
void digest_free(struct digest *d);
int digest_file_window(struct digest *d, char *filename,
+ unsigned char *key, size_t keylen,
unsigned char *hash,
ulong start, ulong size);
int digest_file(struct digest *d, char *filename,
+ unsigned char *key, size_t keylen,
unsigned char *hash);
int digest_file_by_name(char *algo, char *filename,
+ unsigned char *key, size_t keylen,
unsigned char *hash);
static inline int digest_init(struct digest *d)