]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: lib/sha256 - add sha256() function
authorEric Biggers <ebiggers@google.com>
Wed, 8 Jul 2020 16:39:40 +0000 (09:39 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Jul 2020 11:49:05 +0000 (21:49 +1000)
commit5c2737b6fa20d81183a058fa7b53ee8f7af30361
treedc3f3877b658e2a9ce6432550e0e5a6d22095d75
parent7d745663b5b55f4fee061d960a09f18492efbbf9
crypto: lib/sha256 - add sha256() function

Add a function sha256() which computes a SHA-256 digest in one step,
combining sha256_init() + sha256_update() + sha256_final().

This is similar to how we also have blake2s().

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/sha.h
lib/crypto/sha256.c