OpenVAS Libraries
9.0.1
nasl
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
46
struct
MD5Context
{
47
uint32
buf
[4];
48
uint32
bits
[2];
49
unsigned
char
in
[64];
50
};
51
52
void
MD5Init
(
struct
MD5Context
*context);
53
void
MD5Update
(
struct
MD5Context
*context,
unsigned
char
const
*
buf
,
54
unsigned
len);
55
void
MD5Final
(
unsigned
char
digest[16],
struct
MD5Context
*context);
56
57
#endif
/* !MD5_H */
MD5Context::in
unsigned char in[64]
Definition:
md5.h:49
uint32
#define uint32
Definition:
md5.h:42
MD5Context::buf
uint32 buf[4]
Definition:
md5.h:47
MD5Final
void MD5Final(unsigned char digest[16], struct MD5Context *context)
Definition:
md5.c:107
MD5Context::bits
uint32 bits[2]
Definition:
md5.h:48
MD5Init
void MD5Init(struct MD5Context *context)
Definition:
md5.c:44
MD5Update
void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len)
Definition:
md5.c:59
MD5Context
Definition:
md5.h:46
Generated on Tue Jul 4 2017 01:37:56 for OpenVAS Libraries by
1.8.13