OSDN Git Service

crypto: blake2s - define shash_alg structs using macros
authorEric Biggers <ebiggers@google.com>
Wed, 23 Dec 2020 08:09:50 +0000 (00:09 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 2 Jan 2021 21:41:37 +0000 (08:41 +1100)
commit0d396058f92ae7e5ac62839fed54bc2bba630ab5
tree45f9b9ef3cc66f2202da2b7afdeed840fcf5b075
parentc4ff41b93d1f10d1b8be258c31a0436c5769fc00
crypto: blake2s - define shash_alg structs using macros

The shash_alg structs for the four variants of BLAKE2s are identical
except for the algorithm name, driver name, and digest size.  So, avoid
code duplication by using a macro to define these structs.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/blake2s_generic.c