summaryrefslogtreecommitdiff
path: root/lib/md5.c
diff options
context:
space:
mode:
authorChia-Wei Wang <chiawei_wang@aspeedtech.com>2021-07-30 09:08:02 +0800
committerTom Rini <trini@konsulko.com>2021-09-01 19:25:37 -0400
commit74bda4fe3d6d153a6b66b5f1e412c32b718bcfbc (patch)
treef20c3b3bcfdb2d77661aecde69f5027aa89840ab /lib/md5.c
parentfe68a67a5f11991146f47c2975a4e1156355a92c (diff)
downloadu-boot-74bda4fe3d6d153a6b66b5f1e412c32b718bcfbc.tar.gz
lib/md5: Export progressive APIs
Export the MD5 hash init/update/finish progressive APIs for better flexibility. Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Diffstat (limited to 'lib/md5.c')
-rw-r--r--lib/md5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/md5.c b/lib/md5.c
index 2ae4a06319..688b7254c6 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -55,7 +55,7 @@ byteReverse(unsigned char *buf, unsigned longs)
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
* initialization constants.
*/
-static void
+void
MD5Init(struct MD5Context *ctx)
{
ctx->buf[0] = 0x67452301;
@@ -71,7 +71,7 @@ MD5Init(struct MD5Context *ctx)
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
-static void
+void
MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
{
register __u32 t;
@@ -120,7 +120,7 @@ MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
-static void
+void
MD5Final(unsigned char digest[16], struct MD5Context *ctx)
{
unsigned int count;