diff options
author | Eric Biggers <ebiggers@google.com> | 2020-01-03 05:04:35 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-01-09 04:30:57 +0100 |
commit | 48fb3e5785be7ef69a43c04f617a1c05000ee2d0 (patch) | |
tree | bfff2c6e847f25d451b842ce269bd795104681ed /include/crypto | |
parent | crypto: algapi - fold crypto_init_spawn() into crypto_grab_spawn() (diff) | |
download | linux-48fb3e5785be7ef69a43c04f617a1c05000ee2d0.tar.xz linux-48fb3e5785be7ef69a43c04f617a1c05000ee2d0.zip |
crypto: hash - add support for new way of freeing instances
Add support to shash and ahash for the new way of freeing instances
(already used for skcipher, aead, and akcipher) where a ->free() method
is installed to the instance struct itself. These methods are more
strongly-typed than crypto_template::free(), which they replace.
This will allow removing support for the old way of freeing instances.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/internal/hash.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h index c84b7cb29887..c550386221bb 100644 --- a/include/crypto/internal/hash.h +++ b/include/crypto/internal/hash.h @@ -30,6 +30,7 @@ struct crypto_hash_walk { }; struct ahash_instance { + void (*free)(struct ahash_instance *inst); union { struct { char head[offsetof(struct ahash_alg, halg.base)]; @@ -40,6 +41,7 @@ struct ahash_instance { }; struct shash_instance { + void (*free)(struct shash_instance *inst); union { struct { char head[offsetof(struct shash_alg, base)]; |