mptcp: use sha256() instead of open coding
authorEric Biggers <ebiggers@google.com>
Wed, 8 Jul 2020 16:39:42 +0000 (09:39 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Jul 2020 11:49:05 +0000 (21:49 +1000)
commit5a7a0d9400677a5e88fdb362c4d32171384068f2
tree3224f8dcdd70409b95f67104da91023986ff944c
parent2164960df8f531a06805fdd28d41758ce7691f75
mptcp: use sha256() instead of open coding

Now that there's a function that calculates the SHA-256 digest of a
buffer in one step, use it instead of sha256_init() + sha256_update() +
sha256_final().

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: mptcp@lists.01.org
Cc: Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
net/mptcp/crypto.c