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>
This commit is contained in:
parent
0390e6aecf
commit
f88ad8de28
1 changed files with 1 additions and 2 deletions
|
@ -154,8 +154,7 @@ static int shash_digest_unaligned(struct shash_desc *desc, const u8 *data,
|
||||||
unsigned int len, u8 *out)
|
unsigned int len, u8 *out)
|
||||||
{
|
{
|
||||||
return crypto_shash_init(desc) ?:
|
return crypto_shash_init(desc) ?:
|
||||||
crypto_shash_update(desc, data, len) ?:
|
crypto_shash_finup(desc, data, len, out);
|
||||||
crypto_shash_final(desc, out);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int crypto_shash_digest(struct shash_desc *desc, const u8 *data,
|
int crypto_shash_digest(struct shash_desc *desc, const u8 *data,
|
||||||
|
|
Loading…
Reference in a new issue