mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 02:36:21 +00:00
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>
This commit is contained in:
parent
e73d340db6
commit
b00ba76a03
@ -164,6 +164,12 @@ static inline struct ahash_instance *ahash_instance(
|
||||
return container_of(inst, struct ahash_instance, s.base);
|
||||
}
|
||||
|
||||
static inline struct ahash_instance *ahash_alg_instance(
|
||||
struct crypto_ahash *ahash)
|
||||
{
|
||||
return ahash_instance(crypto_tfm_alg_instance(&ahash->base));
|
||||
}
|
||||
|
||||
static inline void *ahash_instance_ctx(struct ahash_instance *inst)
|
||||
{
|
||||
return crypto_instance_ctx(ahash_crypto_instance(inst));
|
||||
|
Loading…
x
Reference in New Issue
Block a user