X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fhash.h;h=d8ec4f08e166702d6a33b145f82eee3c78f6a6a3;hb=14b256e5c084e1b693f4ad73c6a8beee7ffcb4af;hp=2a3632623b75e57098d80195627e2f8e1946b637;hpb=3e1fa221f94b7ae3389d166882b77f1da5895f22;p=u-boot diff --git a/include/hash.h b/include/hash.h index 2a3632623b..d8ec4f08e1 100644 --- a/include/hash.h +++ b/include/hash.h @@ -126,5 +126,20 @@ int hash_block(const char *algo_name, const void *data, unsigned int len, * @return 0 if ok, -EPROTONOSUPPORT for an unknown algorithm. */ int hash_lookup_algo(const char *algo_name, struct hash_algo **algop); + +/** + * hash_show() - Print out a hash algorithm and value + * + * You will get a message like this (without a newline at the end): + * + * "sha1 for 9eb3337c ... 9eb3338f ==> 7942ef1df479fd3130f716eb9613d107dab7e257" + * + * @algo: Algorithm used for hash + * @addr: Address of data that was hashed + * @len: Length of data that was hashed + * @output: Hash value to display + */ +void hash_show(struct hash_algo *algo, ulong addr, ulong len, + uint8_t *output); #endif /* !USE_HOSTCC */ #endif