williamr@2
|
1 |
/* MD5.H - header file for MD5C.C
|
williamr@2
|
2 |
* $FreeBSD: src/sys/sys/md5.h,v 1.18 2005/02/10 12:20:42 phk Exp $
|
williamr@2
|
3 |
*/
|
williamr@2
|
4 |
|
williamr@2
|
5 |
/*-
|
williamr@2
|
6 |
|
williamr@2
|
7 |
© Portions copyright (c) 2005-2006 Nokia Corporation.
|
williamr@2
|
8 |
All rights reserved.
|
williamr@2
|
9 |
* © Portions copyright (c) 2007 Symbian Software Ltd. All rights reserved.
|
williamr@2
|
10 |
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
williamr@2
|
11 |
rights reserved.
|
williamr@2
|
12 |
|
williamr@2
|
13 |
License to copy and use this software is granted provided that it
|
williamr@2
|
14 |
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
williamr@2
|
15 |
Algorithm" in all material mentioning or referencing this software
|
williamr@2
|
16 |
or this function.
|
williamr@2
|
17 |
|
williamr@2
|
18 |
License is also granted to make and use derivative works provided
|
williamr@2
|
19 |
that such works are identified as "derived from the RSA Data
|
williamr@2
|
20 |
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
williamr@2
|
21 |
mentioning or referencing the derived work.
|
williamr@2
|
22 |
|
williamr@2
|
23 |
RSA Data Security, Inc. makes no representations concerning either
|
williamr@2
|
24 |
the merchantability of this software or the suitability of this
|
williamr@2
|
25 |
software for any particular purpose. It is provided "as is"
|
williamr@2
|
26 |
without express or implied warranty of any kind.
|
williamr@2
|
27 |
|
williamr@2
|
28 |
These notices must be retained in any copies of any part of this
|
williamr@2
|
29 |
documentation and/or software.
|
williamr@2
|
30 |
*/
|
williamr@2
|
31 |
|
williamr@2
|
32 |
#ifndef _SYS_MD5_H_
|
williamr@2
|
33 |
#define _SYS_MD5_H_
|
williamr@2
|
34 |
/* MD5 context. */
|
williamr@2
|
35 |
|
williamr@2
|
36 |
#if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
|
williamr@2
|
37 |
#define SYMBIAN
|
williamr@2
|
38 |
#endif
|
williamr@2
|
39 |
|
williamr@2
|
40 |
#ifdef __SYMBIAN32__
|
williamr@2
|
41 |
#include <sys/types.h>
|
williamr@2
|
42 |
#endif
|
williamr@2
|
43 |
|
williamr@2
|
44 |
typedef struct MD5Context {
|
williamr@2
|
45 |
u_int32_t state[4]; /* state (ABCD) */
|
williamr@2
|
46 |
u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
|
williamr@2
|
47 |
unsigned char buffer[64]; /* input buffer */
|
williamr@2
|
48 |
} MD5_CTX;
|
williamr@2
|
49 |
|
williamr@2
|
50 |
#include <sys/cdefs.h>
|
williamr@2
|
51 |
|
williamr@2
|
52 |
__BEGIN_DECLS
|
williamr@2
|
53 |
void MD5Init (MD5_CTX *);
|
williamr@2
|
54 |
void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);
|
williamr@2
|
55 |
void MD5Final (unsigned char [16], MD5_CTX *);
|
williamr@2
|
56 |
__END_DECLS
|
williamr@2
|
57 |
#endif /* _SYS_MD5_H_ */
|