]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
crypto: hash - introduce crypto_hash_alg_has_setkey()
authorEric Biggers <ebiggers@google.com>
Wed, 3 Jan 2018 19:16:22 +0000 (11:16 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 22 Feb 2018 14:15:52 +0000 (08:15 -0600)
commit66397372b5cd5ef976deb134c93cbebb45fcb2cc
treec1ead8d6531484994607a38e49546dd1ff30a87f
parente7ea95b6cd5d7400fda7c90457b591d2ecf458a6
crypto: hash - introduce crypto_hash_alg_has_setkey()

BugLink: http://bugs.launchpad.net/bugs/1751064
commit cd6ed77ad5d223dc6299fb58f62e0f5267f7e2ba upstream.

Templates that use an shash spawn can use crypto_shash_alg_has_setkey()
to determine whether the underlying algorithm requires a key or not.
But there was no corresponding function for ahash spawns.  Add it.

Note that the new function actually has to support both shash and ahash
algorithms, since the ahash API can be used with either.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
crypto/ahash.c
include/crypto/internal/hash.h