summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-03-17 12:53:16 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-20 11:45:55 +0100
commitb0be99fc10e50c41b75647a2486c05f9bd47f1c3 (patch)
tree575f7363bca1870aeafaf9a43ea005bfdb7210f0 /include
parentdf4b6f133b5e63d33e1029b21cd6998ff51b5be3 (diff)
downloadbarebox-b0be99fc10e50c41b75647a2486c05f9bd47f1c3.tar.gz
barebox-b0be99fc10e50c41b75647a2486c05f9bd47f1c3.tar.xz
command: add generic digest command
That can be used for digest calculation and verify Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/digest.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/digest.h b/include/digest.h
index 718793a1a7..cb579ee03d 100644
--- a/include/digest.h
+++ b/include/digest.h
@@ -52,17 +52,21 @@ struct digest {
*/
int digest_algo_register(struct digest_algo *d);
void digest_algo_unregister(struct digest_algo *d);
+void digest_algo_prints(const char *prefix);
struct digest *digest_alloc(const char *name);
void digest_free(struct digest *d);
int digest_file_window(struct digest *d, const char *filename,
unsigned char *hash,
+ unsigned char *sig,
ulong start, ulong size);
int digest_file(struct digest *d, const char *filename,
- unsigned char *hash);
+ unsigned char *hash,
+ unsigned char *sig);
int digest_file_by_name(const char *algo, const char *filename,
- unsigned char *hash);
+ unsigned char *hash,
+ unsigned char *sig);
static inline int digest_init(struct digest *d)
{