diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2023-09-14 16:28:21 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-09-20 13:15:29 +0800 |
commit | 534562e59f354495c2644de6540d56713dde9e52 (patch) | |
tree | 6ae71acf5b14d489632d5d482cd4e419b315c7f4 /crypto/aead.c | |
parent | 02968703e846b1b9c7934dc8d6a6dde55dc54001 (diff) |
crypto: aead - Add crypto_has_aead
Add the helper crypto_has_aead. This is meant to replace the
existing use of crypto_has_alg to locate AEAD algorithms.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/aead.c')
-rw-r--r-- | crypto/aead.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/aead.c b/crypto/aead.c index d5ba204ebdbf..54906633566a 100644 --- a/crypto/aead.c +++ b/crypto/aead.c @@ -269,6 +269,12 @@ struct crypto_aead *crypto_alloc_aead(const char *alg_name, u32 type, u32 mask) } EXPORT_SYMBOL_GPL(crypto_alloc_aead); +int crypto_has_aead(const char *alg_name, u32 type, u32 mask) +{ + return crypto_type_has_alg(alg_name, &crypto_aead_type, type, mask); +} +EXPORT_SYMBOL_GPL(crypto_has_aead); + static int aead_prepare_alg(struct aead_alg *alg) { struct crypto_istat_aead *istat = aead_get_stat(alg); |