DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
mdfour.h
Go to the documentation of this file.
1/*
2 mdfour.h
3
4 an implementation of MD4 designed for use in the SMB authentication
5 protocol
6
7 Copyright (C) Andrew Tridgell 1997-1998
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18 See the GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to:
22
23 Free Software Foundation, Inc.
24 59 Temple Place - Suite 330
25 Boston, MA 02111-1307, USA
26*/
27
28#ifndef _MDFOUR_H
29#define _MDFOUR_H
30
31#include <stdint.h>
32
33struct mdfour_s {
34 uint32_t A, B, C, D;
35 uint32_t totalN;
36};
37
38void mdfour_begin(struct mdfour_s *md); // old: MD4Init
39void mdfour_update(struct mdfour_s *md, const unsigned char *in, int n); //old: MD4Update
40void mdfour_result(struct mdfour_s *md, unsigned char *out); // old: MD4Final
41void mdfour(unsigned char *out, const unsigned char *in, int n);
42
43#endif // _MDFOUR_H
44
#define n(x, y)
void mdfour_update(struct mdfour_s *md, const unsigned char *in, int n)
Definition mdfour.c:152
void mdfour_begin(struct mdfour_s *md)
Definition mdfour.c:115
void mdfour(unsigned char *out, const unsigned char *in, int n)
Definition mdfour.c:182
void mdfour_result(struct mdfour_s *md, unsigned char *out)
Definition mdfour.c:173
uint32_t C
Definition mdfour.h:34
uint32_t B
Definition mdfour.h:34
uint32_t totalN
Definition mdfour.h:35
uint32_t D
Definition mdfour.h:34
uint32_t A
Definition mdfour.h:34