summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2025-04-12 18:57:33 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2025-04-16 15:36:24 +0800
commite13b67e9d02829620c1c57d1b008e9c7ef954d19 (patch)
treeb97d37f3dfce04f255cc7be295886adfa986f717
parentcb16ba46958e41f8d805cbdb027a601b3a0c65b4 (diff)
crypto: sm3-base - Use sm3_init
Remove the duplicate init code and simply call sm3_init. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--include/crypto/sm3_base.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/include/crypto/sm3_base.h b/include/crypto/sm3_base.h
index b33ed39c2bce..835896228e8e 100644
--- a/include/crypto/sm3_base.h
+++ b/include/crypto/sm3_base.h
@@ -20,18 +20,7 @@ typedef void (sm3_block_fn)(struct sm3_state *sst, u8 const *src, int blocks);
static inline int sm3_base_init(struct shash_desc *desc)
{
- struct sm3_state *sctx = shash_desc_ctx(desc);
-
- sctx->state[0] = SM3_IVA;
- sctx->state[1] = SM3_IVB;
- sctx->state[2] = SM3_IVC;
- sctx->state[3] = SM3_IVD;
- sctx->state[4] = SM3_IVE;
- sctx->state[5] = SM3_IVF;
- sctx->state[6] = SM3_IVG;
- sctx->state[7] = SM3_IVH;
- sctx->count = 0;
-
+ sm3_init(shash_desc_ctx(desc));
return 0;
}