Commit ab6223dc authored by Herbert Xu's avatar Herbert Xu

crypto: skcipher - Add crypto_spawn_skcipher_alg_common

As skcipher spawns can be of two different types (skcipher vs.
lskcipher), only the common fields can be accessed.  Add a helper
to return the common algorithm object.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 9a91792d
...@@ -160,6 +160,12 @@ static inline struct lskcipher_alg *crypto_lskcipher_spawn_alg( ...@@ -160,6 +160,12 @@ static inline struct lskcipher_alg *crypto_lskcipher_spawn_alg(
return container_of(spawn->base.alg, struct lskcipher_alg, co.base); return container_of(spawn->base.alg, struct lskcipher_alg, co.base);
} }
static inline struct skcipher_alg_common *crypto_spawn_skcipher_alg_common(
struct crypto_skcipher_spawn *spawn)
{
return container_of(spawn->base.alg, struct skcipher_alg_common, base);
}
static inline struct skcipher_alg *crypto_spawn_skcipher_alg( static inline struct skcipher_alg *crypto_spawn_skcipher_alg(
struct crypto_skcipher_spawn *spawn) struct crypto_skcipher_spawn *spawn)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment