Reorder and "style-up" names.c..
[s-mailx.git] / md5.h
blob61fae221d484b5f4c76ea2fd58a7e5b4ad8bb46e
1 /*
2 * S-nail - a mail user agent derived from Berkeley Mail.
4 * Copyright (c) 2000-2004 Gunnar Ritter, Freiburg i. Br., Germany.
5 * Copyright (c) 2012 Steffen "Daode" Nurpmeso.
6 */
7 /*
8 * Derived from RFC 1321:
9 */
10 /* MD5.H - header file for MD5C.C
13 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
14 rights reserved.
16 License to copy and use this software is granted provided that it
17 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
18 Algorithm" in all material mentioning or referencing this software
19 or this function.
21 License is also granted to make and use derivative works provided
22 that such works are identified as "derived from the RSA Data
23 Security, Inc. MD5 Message-Digest Algorithm" in all material
24 mentioning or referencing the derived work.
26 RSA Data Security, Inc. makes no representations concerning either
27 the merchantability of this software or the suitability of this
28 software for any particular purpose. It is provided "as is"
29 without express or implied warranty of any kind.
31 These notices must be retained in any copies of any part of this
32 documentation and/or software.
35 #ifdef USE_MD5
38 * This version of MD5 has been changed such that any unsigned type with
39 * at least 32 bits is acceptable. This is important e.g. for Cray vector
40 * machines which provide only 64-bit integers.
42 typedef unsigned long md5_type;
44 typedef struct {
45 md5_type state[4]; /* state (ABCD) */
46 md5_type count[2]; /* number of bits, modulo 2^64 (lsb first) */
47 unsigned char buffer[64]; /* input buffer */
48 } MD5_CTX;
50 void MD5Init(MD5_CTX *);
51 void MD5Update(MD5_CTX *, unsigned char *, unsigned int);
52 void MD5Final(unsigned char[16], MD5_CTX *);
54 void hmac_md5(unsigned char *, int, unsigned char *, int, void *);
56 #endif /* USE_MD5 */