summaryrefslogtreecommitdiff
path: root/include/u-boot
diff options
context:
space:
mode:
authorRaymond Mao <[email protected]>2024-05-16 14:11:51 -0700
committerTom Rini <[email protected]>2024-05-22 08:55:28 -0600
commit0fe031dd722079cd076cc120d45e1711eb108fe3 (patch)
tree7c78ca1599a8ca16d4fea27d53b8a53a6c7a8ddb /include/u-boot
parent329bb6677bf9cee18d4b87cb067ee832d0bb8e7b (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 'include/u-boot')
-rw-r--r--include/u-boot/md5.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/u-boot/md5.h b/include/u-boot/md5.h
index d61364c0ae3..c465925ea8d 100644
--- a/include/u-boot/md5.h
+++ b/include/u-boot/md5.h
@@ -10,18 +10,18 @@
#define MD5_SUM_LEN 16
-struct MD5Context {
+typedef struct MD5Context {
__u32 buf[4];
__u32 bits[2];
union {
unsigned char in[64];
__u32 in32[16];
};
-};
+} MD5Context;
-void MD5Init(struct MD5Context *ctx);
-void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
-void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
+void MD5Init(MD5Context *ctx);
+void MD5Update(MD5Context *ctx, unsigned char const *buf, unsigned int len);
+void MD5Final(unsigned char digest[16], MD5Context *ctx);
/*
* Calculate and store in 'output' the MD5 digest of 'len' bytes at