diff options
author | Eric Biggers <ebiggers@google.com> | 2020-01-02 19:58:44 -0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-01-09 11:30:54 +0800 |
commit | 77f7e94d72208a1a84c88ed4de16a9bf368e9ded (patch) | |
tree | 2e1811943519490a5198f2ae13d5e31a336bfcb0 /crypto/ccm.c | |
parent | 1b84e7d01da58d6a41ac244b4b5e481e336fd09b (diff) | |
download | linux-77f7e94d72208a1a84c88ed4de16a9bf368e9ded.tar.bz2 |
crypto: ahash - make struct ahash_instance be the full size
Define struct ahash_instance in a way analogous to struct
skcipher_instance, struct aead_instance, and struct akcipher_instance,
where the struct is defined to include both the algorithm structure at
the beginning and the additional crypto_instance fields at the end.
This is needed to allow allocating ahash instances directly using
kzalloc(sizeof(*inst) + sizeof(*ictx), ...) in the same way as skcipher,
aead, and akcipher instances. In turn, that's needed to make spawns be
initialized in a consistent way everywhere.
Also take advantage of the addition of the base instance to struct
ahash_instance by simplifying the ahash_crypto_instance() and
ahash_instance() functions.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ccm.c')
0 files changed, 0 insertions, 0 deletions