summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2022-06-27 11:51:57 +0200
committerJens Axboe <axboe@kernel.dk>2022-08-03 01:14:47 +0200
commit85cc424381804386d991f81e08b4933ca1f04214 (patch)
treee25e64678767821da8150875cf66112f64981068 /include
parentnvme-loop: use nvme core helpers to cancel all requests in a tagset (diff)
downloadlinux-85cc424381804386d991f81e08b4933ca1f04214.tar.xz
linux-85cc424381804386d991f81e08b4933ca1f04214.zip
crypto: add crypto_has_shash()
Add helper function to determine if a given synchronous hash is supported. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/hash.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index f140e4643949..f5841992dc9b 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -718,6 +718,8 @@ static inline void ahash_request_set_crypt(struct ahash_request *req,
struct crypto_shash *crypto_alloc_shash(const char *alg_name, u32 type,
u32 mask);
+int crypto_has_shash(const char *alg_name, u32 type, u32 mask);
+
static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm)
{
return &tfm->base;