Fix nxstyle issue for Juha patch

This commit is contained in:
Alan C. Assis 2020-04-16 10:28:12 -03:00 committed by patacongo
parent 408d73903e
commit b5f153cb6c
4 changed files with 52 additions and 46 deletions

View file

@ -10,7 +10,6 @@
*
* This code implements the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was
* written by Colin Plumb in 1993, no copyright is claimed.
* This code is in the public domain; do with it what you wish.
*
* Equivalent code is available from RSA Data Security, Inc.
@ -19,8 +18,8 @@
* with every copy.
*
* To compute the message digest of a chunk of bytes, declare an
* MD5Context structure, pass it to MD5Init, call MD5Update as
* needed on buffers full of bytes, and then call MD5Final, which
* md5_context_s structure, pass it to md5_init, call md5_update as
* needed on buffers full of bytes, and then call md5_final, which
* will fill a supplied 16-byte array with the digest.
*
* See README and COPYING for more details.
@ -74,24 +73,24 @@ extern "C"
* Public Types
****************************************************************************/
struct MD5Context
struct md5_context_s
{
uint32_t buf[4];
uint32_t bits[2];
uint8_t in[64];
};
typedef struct MD5Context MD5_CTX;
typedef struct md5_context_s MD5_CTX;
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
void MD5Init(struct MD5Context *context);
void MD5Update(struct MD5Context *context, unsigned char const *buf,
void md5_init(struct md5_context_s *context);
void md5_update(struct md5_context_s *context, unsigned char const *buf,
unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context);
void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
void md5_final(unsigned char digest[16], struct md5_context_s *context);
void md5_transform(uint32_t buf[4], uint32_t const in[16]);
void md5_sum(const uint8_t *addr, const size_t len, uint8_t *mac);
char *md5_hash(const uint8_t *addr, const size_t len);