diff options
| author | Raymond Mao <[email protected]> | 2024-05-16 14:11:51 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-05-22 08:55:28 -0600 |
| commit | 0fe031dd722079cd076cc120d45e1711eb108fe3 (patch) | |
| tree | 7c78ca1599a8ca16d4fea27d53b8a53a6c7a8ddb /drivers/crypto | |
| parent | 329bb6677bf9cee18d4b87cb067ee832d0bb8e7b (diff) | |
md5: Use typedef for MD5 context
Use of typedef is beneficial for porting with other crypto libs
without changing the API callers.
Secondly, it is for the code consistency with other digest libs.
SHA1, SHA256 and SHA512 are all using typedef for their context.
Signed-off-by: Raymond Mao <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'drivers/crypto')
| -rw-r--r-- | drivers/crypto/hash/hash_sw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/hash/hash_sw.c b/drivers/crypto/hash/hash_sw.c index ffd4ab149ff..4590e225481 100644 --- a/drivers/crypto/hash/hash_sw.c +++ b/drivers/crypto/hash/hash_sw.c @@ -50,17 +50,17 @@ static void hash_finish_crc32(void *ctx, void *obuf) /* MD5 */ static void hash_init_md5(void *ctx) { - MD5Init((struct MD5Context *)ctx); + MD5Init((MD5Context *)ctx); } static void hash_update_md5(void *ctx, const void *ibuf, uint32_t ilen) { - MD5Update((struct MD5Context *)ctx, ibuf, ilen); + MD5Update((MD5Context *)ctx, ibuf, ilen); } static void hash_finish_md5(void *ctx, void *obuf) { - MD5Final(obuf, (struct MD5Context *)ctx); + MD5Final(obuf, (MD5Context *)ctx); } /* SHA1 */ @@ -158,7 +158,7 @@ static struct sw_hash_impl sw_hash_impl[HASH_ALGO_NUM] = { .init = hash_init_md5, .update = hash_update_md5, .finish = hash_finish_md5, - .ctx_alloc_sz = sizeof(struct MD5Context), + .ctx_alloc_sz = sizeof(MD5Context), }, [HASH_ALGO_SHA1] = { |
