OSDN Git Service

crypto: blake2s - move update and final logic to internal/blake2s.h
authorEric Biggers <ebiggers@google.com>
Wed, 23 Dec 2020 08:09:53 +0000 (00:09 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 2 Jan 2021 21:41:38 +0000 (08:41 +1100)
commit057edc9c8bb2d5ff5b058b521792c392428a0714
treec9eef3ec1b8c2291af5b0ed0dec286a6efac251c
parentdf412e7efda1e2c5b5fcb06701bba77434cbd1e8
crypto: blake2s - move update and final logic to internal/blake2s.h

Move most of blake2s_update() and blake2s_final() into new inline
functions __blake2s_update() and __blake2s_final() in
include/crypto/internal/blake2s.h so that this logic can be shared by
the shash helper functions.  This will avoid duplicating this logic
between the library and shash implementations.

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