Skip to content

Commit

Permalink
crypto: shash - Use finup in default digest
Browse files Browse the repository at this point in the history
This patch simplifies the default digest function by using finup.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Jul 8, 2009
1 parent 0390e6a commit f88ad8d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crypto/shash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f88ad8d

Please sign in to comment.