1/* $NetBSD: md2.h,v 1.7 2016/07/01 16:42:46 christos 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#define MD2_BLOCK_LENGTH 16
13
14/* MD2 context. */
15typedef struct MD2Context {
16 uint32_t i;
17 unsigned char C[16]; /* checksum */
18 unsigned char X[48]; /* input buffer */
19} MD2_CTX;
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25void MD2Init(MD2_CTX *);
26void MD2Update(MD2_CTX *, const unsigned char *, unsigned int);
27void MD2Final(unsigned char[16], MD2_CTX *);
28char *MD2End(MD2_CTX *, char *);
29char *MD2File(const char *, char *);
30char *MD2FileChunk(const char *, char *, off_t, off_t);
31char *MD2Data(const unsigned char *, size_t, char *);
32
33#ifdef __cplusplus
34}
35#endif
36
37#endif /* _MD2_H_ */
38

source code of include/md2.h