Sync libmd with FreeBSD:
[dragonfly.git] / lib / libmd / md2.h
CommitLineData
984263bc 1/* MD2.H - header file for MD2C.C
3cd01911
SW
2 * $FreeBSD: src/lib/libmd/md2.h,v 1.10 2006/01/17 15:35:56 phk Exp $
3 * $DragonFly: src/lib/libmd/md2.h,v 1.3 2008/09/11 20:25:34 swildner Exp $
984263bc
MD
4 */
5
6/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
7 rights reserved.
8
9 License to copy and use this software is granted for
10 non-commercial Internet Privacy-Enhanced Mail provided that it is
11 identified as the "RSA Data Security, Inc. MD2 Message Digest
12 Algorithm" in all material mentioning or referencing this software
13 or this function.
14
15 RSA Data Security, Inc. makes no representations concerning either
16 the merchantability of this software or the suitability of this
17 software for any particular purpose. It is provided "as is"
18 without express or implied warranty of any kind.
19
20 These notices must be retained in any copies of any part of this
21 documentation and/or software.
22 */
23
24#ifndef _MD2_H_
25#define _MD2_H_
26
27typedef struct MD2Context {
28 unsigned char state[16]; /* state */
29 unsigned char checksum[16]; /* checksum */
30 unsigned int count; /* number of bytes, modulo 16 */
31 unsigned char buffer[16]; /* input buffer */
32} MD2_CTX;
33
34#include <sys/cdefs.h>
35
36__BEGIN_DECLS
37void MD2Init(MD2_CTX *);
3cd01911 38void MD2Update(MD2_CTX *, const void *, unsigned int);
984263bc
MD
39void MD2Pad(MD2_CTX *);
40void MD2Final(unsigned char [16], MD2_CTX *);
41char * MD2End(MD2_CTX *, char *);
42char * MD2File(const char *, char *);
3cd01911
SW
43char * MD2FileChunk(const char *, char *, off_t, off_t);
44char * MD2Data(const void *, unsigned int, char *);
984263bc
MD
45__END_DECLS
46
47#endif /* _MD2_H_ */