]> 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)
commit2ca473af483462905030d5137fcc457b4545bea7
treedc3f3877b658e2a9ce6432550e0e5a6d22095d75
parent7f8a186603cdc39e069e5285cd370e8951cf4e34
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