summaryrefslogtreecommitdiffstats
path: root/crypto/sha512.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-05-16 22:06:54 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-06-26 17:34:38 +1000
commit43600106e32809a4dead79fec67a63e9860e3d5d (patch)
tree20590746b98c41d6cc8b590b01cecddf9a185270 /crypto/sha512.c
parent8b55ba0303bb59c34fab8e015634018780491614 (diff)
downloadop-kernel-dev-43600106e32809a4dead79fec67a63e9860e3d5d.zip
op-kernel-dev-43600106e32809a4dead79fec67a63e9860e3d5d.tar.gz
[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>
Diffstat (limited to 'crypto/sha512.c')
-rw-r--r--crypto/sha512.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/crypto/sha512.c b/crypto/sha512.c
index 7dbec4f..bc77a66 100644
--- a/crypto/sha512.c
+++ b/crypto/sha512.c
@@ -173,7 +173,6 @@ sha512_init(void *ctx)
sctx->state[6] = H6;
sctx->state[7] = H7;
sctx->count[0] = sctx->count[1] = sctx->count[2] = sctx->count[3] = 0;
- memset(sctx->buf, 0, sizeof(sctx->buf));
}
static void
@@ -189,7 +188,6 @@ sha384_init(void *ctx)
sctx->state[6] = HP6;
sctx->state[7] = HP7;
sctx->count[0] = sctx->count[1] = sctx->count[2] = sctx->count[3] = 0;
- memset(sctx->buf, 0, sizeof(sctx->buf));
}
static void
OpenPOWER on IntegriCloud