Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: ahash - Add ahash_alg_instance

This patch adds the helper ahash_alg_instance which is used to
convert a crypto_ahash object into its corresponding ahash_instance.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+6
+6
include/crypto/internal/hash.h
··· 164 164 return container_of(inst, struct ahash_instance, s.base); 165 165 } 166 166 167 + static inline struct ahash_instance *ahash_alg_instance( 168 + struct crypto_ahash *ahash) 169 + { 170 + return ahash_instance(crypto_tfm_alg_instance(&ahash->base)); 171 + } 172 + 167 173 static inline void *ahash_instance_ctx(struct ahash_instance *inst) 168 174 { 169 175 return crypto_instance_ctx(ahash_crypto_instance(inst));