From f30fe24e55b60b2fd92e8c8f3e2da60d895d1b8a Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 31 Mar 2022 09:59:33 +0800 Subject: [PATCH] [TS-1368]: del original MD5 func. --- src/util/inc/tmd5.h | 8 +------- src/util/src/tmd5.c | 9 --------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/util/inc/tmd5.h b/src/util/inc/tmd5.h index bf6a7d86ee..d73b6df556 100644 --- a/src/util/inc/tmd5.h +++ b/src/util/inc/tmd5.h @@ -32,13 +32,7 @@ typedef struct { uint32_t buf[4]; /* scratch buffer */ uint8_t in[64]; /* input buffer */ uint8_t digest[16]; /* actual digest after tMD5Final call */ -} MD5_CTX; - -typedef MD5_CTX T_MD5_CTX; - -void MD5Init(T_MD5_CTX *mdContext); -void MD5Update(T_MD5_CTX *mdContext, uint8_t *inBuf, unsigned int inLen); -void MD5Final(T_MD5_CTX *mdContext); +} T_MD5_CTX; void tMD5Init(T_MD5_CTX *mdContext); void tMD5Update(T_MD5_CTX *mdContext, uint8_t *inBuf, unsigned int inLen); diff --git a/src/util/src/tmd5.c b/src/util/src/tmd5.c index ce1db7d7c0..4549c95aae 100644 --- a/src/util/src/tmd5.c +++ b/src/util/src/tmd5.c @@ -94,9 +94,6 @@ void tMD5Init(T_MD5_CTX *mdContext) { mdContext->buf[2] = (uint32_t)0x98badcfe; mdContext->buf[3] = (uint32_t)0x10325476; } -void MD5Init(MD5_CTX *mdContext) { - tMD5Init(mdContext); -} /* The routine tMD5Update updates the message-digest context to account for the presence of each of the characters inBuf[0..inLen-1] @@ -129,9 +126,6 @@ void tMD5Update(T_MD5_CTX *mdContext, uint8_t *inBuf, unsigned int inLen) { } } } -void MD5Update(MD5_CTX *mdContext, uint8_t *inBuf, unsigned int inLen) { - tMD5Update(mdContext, inBuf, inLen); -} /* The routine tMD5Final terminates the message-digest computation and ends with the desired message digest in mdContext->digest[0...15]. @@ -167,9 +161,6 @@ void tMD5Final(T_MD5_CTX *mdContext) { mdContext->digest[ii + 3] = (uint8_t)((mdContext->buf[i] >> 24) & 0xFF); } } -void MD5Final(MD5_CTX *mdContext) { - tMD5Final(mdContext); -} /* Basic MD5 step. Transforms buf based on in. */ -- GitLab