Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / include / md2.h
blob02a64fba4524df5b3ca0883e845f6793114b7ed2
1 /* $NetBSD: md2.h,v 1.5 2005/09/25 00:48:21 xtraeme Exp $ */
3 #ifndef _MD2_H_
4 #define _MD2_H_
6 #include <sys/cdefs.h>
7 #include <sys/types.h>
9 #define MD2_DIGEST_LENGTH 16
10 #define MD2_DIGEST_STRING_LENGTH 33
12 /* MD2 context. */
13 typedef struct MD2Context {
14 uint32_t i;
15 unsigned char C[16]; /* checksum */
16 unsigned char X[48]; /* input buffer */
17 } MD2_CTX;
19 __BEGIN_DECLS
20 void MD2Init(MD2_CTX *);
21 void MD2Update(MD2_CTX *, const unsigned char *, unsigned int);
22 void MD2Final(unsigned char[16], MD2_CTX *);
23 char *MD2End(MD2_CTX *, char *);
24 char *MD2File(const char *, char *);
25 char *MD2FileChunk(const char *, char *, off_t, off_t);
26 char *MD2Data(const unsigned char *, size_t, char *);
27 __END_DECLS
29 #endif /* _MD2_H_ */