summaryrefslogtreecommitdiff
path: root/libraries/base/include/md5.h
blob: a1b61570759c4d691e5b1ee6257ae3644533d548 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* MD5 message digest */
#pragma once

#include "HsFFI.h"

typedef HsWord32 word32;
typedef HsWord8  byte;

struct MD5Context {
	word32 buf[4];
	word32 bytes[2];
	word32 in[16];
};

void __hsbase_MD5Init(struct MD5Context *context);
void __hsbase_MD5Update(struct MD5Context *context, byte const *buf, int len);
void __hsbase_MD5Final(byte digest[16], struct MD5Context *context);
void __hsbase_MD5Transform(word32 buf[4], word32 const in[16]);