[PATCH 11/16] crypto: shash - Use finup in default digest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



crypto: shash - Use finup in default digest

This patch simplifies the default digest function by using finup.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
---

 crypto/shash.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/crypto/shash.c b/crypto/shash.c
index 3d24242..7832310 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -154,8 +154,7 @@ static int shash_digest_unaligned(struct shash_desc *desc, const u8 *data,
 				  unsigned int len, u8 *out)
 {
 	return crypto_shash_init(desc) ?:
-	       crypto_shash_update(desc, data, len) ?:
-	       crypto_shash_final(desc, out);
+	       crypto_shash_finup(desc, data, len, out);
 }
 
 int crypto_shash_digest(struct shash_desc *desc, const u8 *data,
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux