crypto: hash - add support for new way of freeing instances
authorEric Biggers <ebiggers@google.com>
Fri, 3 Jan 2020 04:04:35 +0000 (20:04 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jan 2020 03:30:57 +0000 (11:30 +0800)
commit48fb3e5785be7ef69a43c04f617a1c05000ee2d0
treebfff2c6e847f25d451b842ce269bd795104681ed
parentaed11cf57ddb24aa97ca3b55c9e26c37759c4baa
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>
crypto/ahash.c
crypto/shash.c
include/crypto/internal/hash.h