root / lab4 / .minix-src / include / md2.h @ 14
History | View | Annotate | Download (721 Bytes)
1 | 13 | up20180614 | /* $NetBSD: md2.h,v 1.6 2005/12/26 19:01:47 perry Exp $ */
|
---|---|---|---|
2 | |||
3 | #ifndef _MD2_H_
|
||
4 | #define _MD2_H_
|
||
5 | |||
6 | #include <sys/cdefs.h> |
||
7 | #include <sys/types.h> |
||
8 | |||
9 | #define MD2_DIGEST_LENGTH 16 |
||
10 | #define MD2_DIGEST_STRING_LENGTH 33 |
||
11 | |||
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; |
||
18 | |||
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 |
||
28 | |||
29 | #endif /* _MD2_H_ */ |