summaryrefslogtreecommitdiffstats
path: root/crypto/ahash.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2016-01-23 13:52:40 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2016-01-25 22:42:13 +0800
commit8d18e34c1fe22418ae0b5475ab0d1956d69ad195 (patch)
tree805ed0cdc260466e4e58f5037e4d2c275650ef33 /crypto/ahash.c
parentf2aefdab5dff83d3c801449051be1ba72c7e933a (diff)
downloadlinux-stable-8d18e34c1fe22418ae0b5475ab0d1956d69ad195.tar.gz
linux-stable-8d18e34c1fe22418ae0b5475ab0d1956d69ad195.tar.bz2
linux-stable-8d18e34c1fe22418ae0b5475ab0d1956d69ad195.zip
crypto: hash - Add crypto_has_ahash helper
This patch adds the helper crypto_has_ahash which should replace crypto_has_hash. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ahash.c')
-rw-r--r--crypto/ahash.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index d19b52324cf5..8b08a59221a6 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -542,6 +542,12 @@ struct crypto_ahash *crypto_alloc_ahash(const char *alg_name, u32 type,
}
EXPORT_SYMBOL_GPL(crypto_alloc_ahash);
+int crypto_has_ahash(const char *alg_name, u32 type, u32 mask)
+{
+ return crypto_type_has_alg(alg_name, &crypto_ahash_type, type, mask);
+}
+EXPORT_SYMBOL_GPL(crypto_has_ahash);
+
static int ahash_prepare_alg(struct ahash_alg *alg)
{
struct crypto_alg *base = &alg->halg.base;