]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - crypto/ahash.c
crypto: hash - Export shash through hash
[mv-sheeva.git] / crypto / ahash.c
index 7d4e33dfe2124379e63e303c5b722153e04e781c..9f98956b17fc586819cdabcce01240344e727d94 100644 (file)
@@ -112,6 +112,22 @@ int crypto_hash_walk_first(struct ahash_request *req,
 }
 EXPORT_SYMBOL_GPL(crypto_hash_walk_first);
 
+int crypto_hash_walk_first_compat(struct hash_desc *hdesc,
+                                 struct crypto_hash_walk *walk,
+                                 struct scatterlist *sg, unsigned int len)
+{
+       walk->total = len;
+
+       if (!walk->total)
+               return 0;
+
+       walk->alignmask = crypto_hash_alignmask(hdesc->tfm);
+       walk->sg = sg;
+       walk->flags = hdesc->flags;
+
+       return hash_walk_new_entry(walk);
+}
+
 static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key,
                                unsigned int keylen)
 {