summaryrefslogtreecommitdiff
path: root/mdfour.h
blob: c196a09e952ef7b164caa94d272ca031d02e32f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef MDFOUR_H
#define MDFOUR_H

#include <stddef.h>
#include <inttypes.h>

struct mdfour {
	uint32_t A, B, C, D;
	size_t totalN;
	unsigned char tail[64];
	size_t tail_len;
	int finalized;
};

void mdfour_begin(struct mdfour *md);
void mdfour_update(struct mdfour *md, const unsigned char *in, size_t n);
void mdfour_result(struct mdfour *md, unsigned char *out);

#endif