crypto: hash - Make crypto_ahash_alg helper available
[platform/kernel/linux-starfive.git] / include / crypto / internal / hash.h
index b925f82..cf65676 100644 (file)
@@ -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)
 {