diff options
author | Ruchika Gupta <ruchika.gupta@freescale.com> | 2015-01-23 16:01:57 +0530 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-29 17:09:59 -0700 |
commit | 46fe2c04443f3d777791910da21649bb3ddf878f (patch) | |
tree | 4713a5df7c7a962f5535f7f01ef76b767bf8221a /include/hash.h | |
parent | d9f23c7fe20fced0a84713d5084a6d2896463257 (diff) |
hash: Add function to find hash_algo struct with progressive hash
The hash_algo structure has some implementations in which progressive hash
API's are not defined. These are basically the hardware based implementations
of SHA. An API is added to find the algo which has progressive hash API's
defined. This can then be integrated with RSA checksum library which uses
Progressive Hash API's.
Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
CC: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/hash.h')
-rw-r--r-- | include/hash.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/hash.h b/include/hash.h index d8ec4f08e1..c0a7ebc6a6 100644 --- a/include/hash.h +++ b/include/hash.h @@ -128,6 +128,20 @@ int hash_block(const char *algo_name, const void *data, unsigned int len, int hash_lookup_algo(const char *algo_name, struct hash_algo **algop); /** + * hash_progressive_lookup_algo() - Look up hash_algo for prog. hash support + * + * The function returns the pointer to the struct or -EPROTONOSUPPORT if the + * algorithm is not available with progressive hash support. + * + * @algo_name: Hash algorithm to look up + * @algop: Pointer to the hash_algo struct if found + * + * @return 0 if ok, -EPROTONOSUPPORT for an unknown algorithm. + */ +int hash_progressive_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): |