[CRYPTO] digest: Remove unnecessary zeroing during init
Various digest algorithms operate one block at a time and therefore keep a temporary buffer of partial blocks. This buffer does not need to be initialised since there is a counter which indicates what is and isn't valid in it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@ -242,7 +242,6 @@ static void sha256_init(void *ctx)
|
||||
sctx->state[6] = H6;
|
||||
sctx->state[7] = H7;
|
||||
sctx->count[0] = sctx->count[1] = 0;
|
||||
memset(sctx->buf, 0, sizeof(sctx->buf));
|
||||
}
|
||||
|
||||
static void sha256_update(void *ctx, const u8 *data, unsigned int len)
|
||||
|
Reference in New Issue
Block a user