1/* $NetBSD: md2.h,v 1.5 2005/09/25 00:48:21 xtraeme Exp $ */
2
3#ifndef _MD2_H_
4#define _MD2_H_
5
6#include <sys/types.h>
7
8#include <stdint.h>
9
10#define MD2_DIGEST_LENGTH 16
11#define MD2_DIGEST_STRING_LENGTH 33
12
13/* MD2 context. */
14typedef struct MD2Context {
15 uint32_t i;
16 unsigned char C[16]; /* checksum */
17 unsigned char X[48]; /* input buffer */
18} MD2_CTX;
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24void MD2Init(MD2_CTX *);
25void MD2Update(MD2_CTX *, const unsigned char *, unsigned int);
26void MD2Final(unsigned char[16], MD2_CTX *);
27char *MD2End(MD2_CTX *, char *);
28char *MD2File(const char *, char *);
29char *MD2FileChunk(const char *, char *, off_t, off_t);
30char *MD2Data(const unsigned char *, size_t, char *);
31
32#ifdef __cplusplus
33}
34#endif
35
36#endif /* _MD2_H_ */
37

source code of include/md2.h