lib: Drop SHA512_ALGO in lieu of SHA512

SHA512_ALGO was used as a "either SHA512 or SHA384", although the
implementations of these two algorithms share a majority of code.

From a Kconfig interface perspective, it makes sense to present two
distinct options. This requires #ifdefing out the SHA512
implementation from sha512.c. The latter doesn't make any sense.

It's reasonable to say in Kconfig that SHA384 depends on SHA512, and
seems to be the more polite way to handle the selection.

Thus, automatically select SHA512 when SHA384 is enabled.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
Alexandru Gagniuc
2021-09-02 19:54:18 -05:00
committed by Tom Rini
parent eb5171ddec
commit e60e449931
6 changed files with 8 additions and 14 deletions

View File

@@ -320,7 +320,6 @@ void sha384_csum_wd(const unsigned char *input, unsigned int ilen,
#endif
#if defined(CONFIG_SHA512)
void sha512_starts(sha512_context * ctx)
{
ctx->state[0] = SHA512_H0;
@@ -381,4 +380,3 @@ void sha512_csum_wd(const unsigned char *input, unsigned int ilen,
sha512_finish(&ctx, output);
}
#endif