mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
ba754eec03
This implementation was written by Colin Plumb and is in the public domain. I've updated it to use stdint.h and the standard C types rather than sys/types.h for portability. Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
24 lines
637 B
C
24 lines
637 B
C
#ifndef _MD5_H_
|
|
#define _MD5_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
#define MD5_HASHBYTES 16
|
|
|
|
typedef struct MD5Context {
|
|
uint32_t buf[4];
|
|
uint32_t bits[2];
|
|
unsigned char in[64];
|
|
} MD5_CTX;
|
|
|
|
extern void MD5Init(MD5_CTX *context);
|
|
extern void MD5Update(MD5_CTX *context, unsigned char const *buf,
|
|
unsigned len);
|
|
extern void MD5Final(unsigned char digest[MD5_HASHBYTES], MD5_CTX *context);
|
|
extern void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
|
|
extern char * MD5End(MD5_CTX *, char *);
|
|
extern char * MD5File(const char *, char *);
|
|
extern char * MD5Data (const unsigned char *, unsigned int, char *);
|
|
|
|
#endif /* !_MD5_H_ */
|