]> git.sur5r.net Git - u-boot/blobdiff - include/hash.h
hash: Add function to find hash_algo struct with progressive hash
[u-boot] / include / hash.h
index d8ec4f08e166702d6a33b145f82eee3c78f6a6a3..c0a7ebc6a6cbe583b4eafe4adb74c7b44387c8ea 100644 (file)
@@ -127,6 +127,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
  *