]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: sha256 - Remove sha256/224_init code duplication
authorHans de Goede <hdegoede@redhat.com>
Sun, 1 Sep 2019 20:35:32 +0000 (22:35 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 5 Sep 2019 04:54:54 +0000 (14:54 +1000)
commita5be573e68c25260b7d65dab75ddecafc69d8530
treeac668a21176783b830171a3b2f6e563ca54d1028
parent0368f61225712838fab680045c7ec40355f347b2
crypto: sha256 - Remove sha256/224_init code duplication

lib/crypto/sha256.c and include/crypto/sha256_base.h define
99% identical functions to init a sha256_state struct for sha224 or
sha256 use.

This commit moves the functions from lib/crypto/sha256.c to
include/crypto/sha.h (making them static inline) and makes the
sha224/256_base_init static inline functions from
include/crypto/sha256_base.h wrappers around the now also
static inline include/crypto/sha.h functions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/sha.h
include/crypto/sha256_base.h
lib/crypto/sha256.c