OpenVAS Scanner 21.4.1
md5.h
Go to the documentation of this file.
1/*
2 * This code implements the MD5 message-digest algorithm.
3 * The algorithm is due to Ron Rivest. This code was
4 * written by Colin Plumb in 1993, no copyright is claimed.
5 * This code is in the public domain; do with it what you wish.
6 *
7 * Equivalent code is available from RSA Data Security, Inc.
8 * This code has been tested against that, and is equivalent,
9 * except that you don't need to include two pages of legalese
10 * with every copy.
11 *
12 * To compute the message digest of a chunk of bytes, declare an
13 * MD5Context structure, pass it to MD5Init, call MD5Update as
14 * needed on buffers full of bytes, and then call MD5Final, which
15 * will fill a supplied 16-byte array with the digest.
16 */
17
18/* This code slightly modified to fit into Samba by
19 abartlet@samba.org Jun 2001 */
20
21#ifndef MD5_H
22#define MD5_H
23#ifndef HEADER_MD5_H
24/* Try to avoid clashes with OpenSSL */
25#define HEADER_MD5_H
26#endif
27
28/*
29 * Note we duplicate the size tests in the unsigned
30 * case as int32 may be a typedef from rpc/rpc.h
31 */
32
33#if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H)
34#if (SIZEOF_INT == 4)
35#define uint32 unsigned int
36#elif (SIZEOF_LONG == 4)
37#define uint32 unsigned long
38#elif (SIZEOF_SHORT == 4)
39#define uint32 unsigned short
40#else
41/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */
42#define uint32 unsigned
43#endif
44#endif
45
47{
50 unsigned char in[64];
51};
52
53void
54MD5Init (struct MD5Context *context);
55void
56MD5Update (struct MD5Context *context, unsigned char const *buf, unsigned len);
57void
58MD5Final (unsigned char digest[16], struct MD5Context *context);
59
60#endif /* !MD5_H */
void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len)
Definition: md5.c:66
void MD5Init(struct MD5Context *context)
Definition: md5.c:50
void MD5Final(unsigned char digest[16], struct MD5Context *context)
Definition: md5.c:118
#define uint32
Definition: md5.h:42
uint8_t len
Definition: nasl_packet_forgery.c:1
Definition: md5.h:47
uint32 buf[4]
Definition: md5.h:48
uint32 bits[2]
Definition: md5.h:49
unsigned char in[64]
Definition: md5.h:50