diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2023-04-20 12:05:41 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-05-12 12:48:01 +0200 |
commit | 3908edf868c34ed42e1a0a4c68f142a76a707999 (patch) | |
tree | ca8edb8c0cd5c18d5fa27d7226aaf7db7b7199fa /include/crypto | |
parent | crypto: hash - Add statesize to crypto_ahash (diff) | |
download | linux-3908edf868c34ed42e1a0a4c68f142a76a707999.tar.xz linux-3908edf868c34ed42e1a0a4c68f142a76a707999.zip |
crypto: hash - Make crypto_ahash_alg helper available
Move the crypto_ahash_alg helper into include/crypto/internal so
that drivers can use it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/internal/hash.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h index b925f82206ef..cf65676e45f4 100644 --- a/include/crypto/internal/hash.h +++ b/include/crypto/internal/hash.h @@ -149,6 +149,12 @@ static inline struct ahash_alg *__crypto_ahash_alg(struct crypto_alg *alg) halg); } +static inline struct ahash_alg *crypto_ahash_alg(struct crypto_ahash *hash) +{ + return container_of(crypto_hash_alg_common(hash), struct ahash_alg, + halg); +} + static inline void crypto_ahash_set_statesize(struct crypto_ahash *tfm, unsigned int size) { |