sparc64: get rid of odd callers of copy_regset_to_user()
[linux-2.6-microblaze.git] / crypto / shash.c
index c075b26..e6a4b5f 100644 (file)
@@ -206,6 +206,22 @@ int crypto_shash_digest(struct shash_desc *desc, const u8 *data,
 }
 EXPORT_SYMBOL_GPL(crypto_shash_digest);
 
+int crypto_shash_tfm_digest(struct crypto_shash *tfm, const u8 *data,
+                           unsigned int len, u8 *out)
+{
+       SHASH_DESC_ON_STACK(desc, tfm);
+       int err;
+
+       desc->tfm = tfm;
+
+       err = crypto_shash_digest(desc, data, len, out);
+
+       shash_desc_zero(desc);
+
+       return err;
+}
+EXPORT_SYMBOL_GPL(crypto_shash_tfm_digest);
+
 static int shash_default_export(struct shash_desc *desc, void *out)
 {
        memcpy(out, shash_desc_ctx(desc), crypto_shash_descsize(desc->tfm));