1 1.9 christos /* $NetBSD: md2.h,v 1.9 2024/01/19 18:40:35 christos Exp $ */ 2 1.1 atatat 3 1.1 atatat #ifndef _MD2_H_ 4 1.1 atatat #define _MD2_H_ 5 1.1 atatat 6 1.1 atatat #include <sys/cdefs.h> 7 1.1 atatat #include <sys/types.h> 8 1.1 atatat 9 1.3 elad #define MD2_DIGEST_LENGTH 16 10 1.3 elad #define MD2_DIGEST_STRING_LENGTH 33 11 1.7 christos #define MD2_BLOCK_LENGTH 16 12 1.3 elad 13 1.1 atatat /* MD2 context. */ 14 1.1 atatat typedef struct MD2Context { 15 1.6 perry uint32_t i; 16 1.1 atatat unsigned char C[16]; /* checksum */ 17 1.1 atatat unsigned char X[48]; /* input buffer */ 18 1.1 atatat } MD2_CTX; 19 1.1 atatat 20 1.1 atatat __BEGIN_DECLS 21 1.2 perry void MD2Init(MD2_CTX *); 22 1.2 perry void MD2Update(MD2_CTX *, const unsigned char *, unsigned int); 23 1.2 perry void MD2Final(unsigned char[16], MD2_CTX *); 24 1.8 mrg char *MD2End(MD2_CTX *, char[MD2_DIGEST_STRING_LENGTH]); 25 1.2 perry char *MD2File(const char *, char *); 26 1.5 xtraeme char *MD2FileChunk(const char *, char *, off_t, off_t); 27 1.8 mrg char *MD2Data(const unsigned char *, size_t, char[MD2_DIGEST_STRING_LENGTH]); 28 1.9 christos #ifdef _LIBC_INTERNAL 29 1.9 christos void MD2Transform(MD2_CTX *); 30 1.9 christos #endif 31 1.1 atatat __END_DECLS 32 1.1 atatat 33 1.1 atatat #endif /* _MD2_H_ */ 34