diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 11:32:08 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 11:32:08 -0400 |
commit | f88ad8de282a9c4afd79fb0b4b536025f24a2005 (patch) | |
tree | 98266fc577188d3a2df072f4f6bebc7927b0188d /crypto | |
parent | 0390e6aecf571ddac934e6c0644bb4038167b698 (diff) |
crypto: shash - Use finup in default digest
This patch simplifies the default digest function by using finup.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/shash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/shash.c b/crypto/shash.c index 3d242425d692..783231090005 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, | |||
154 | unsigned int len, u8 *out) | 154 | unsigned int len, u8 *out) |
155 | { | 155 | { |
156 | return crypto_shash_init(desc) ?: | 156 | return crypto_shash_init(desc) ?: |
157 | crypto_shash_update(desc, data, len) ?: | 157 | crypto_shash_finup(desc, data, len, out); |
158 | crypto_shash_final(desc, out); | ||
159 | } | 158 | } |
160 | 159 | ||
161 | int crypto_shash_digest(struct shash_desc *desc, const u8 *data, | 160 | int crypto_shash_digest(struct shash_desc *desc, const u8 *data, |