]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/u-boot/md5.h
mmc: mmc header fix
[people/ms/u-boot.git] / include / u-boot / md5.h
CommitLineData
20a14a42
AF
1/*
2 * This file was transplanted with slight modifications from Linux sources
3 * (fs/cifs/md5.h) into U-Boot by Bartlomiej Sieka <tur@semihalf.com>.
4 */
5
6#ifndef _MD5_H
7#define _MD5_H
8
37566090 9#include "compiler.h"
20a14a42
AF
10
11struct MD5Context {
12 __u32 buf[4];
13 __u32 bits[2];
b68d63ce
MV
14 union {
15 unsigned char in[64];
16 __u32 in32[16];
17 };
20a14a42
AF
18};
19
20/*
21 * Calculate and store in 'output' the MD5 digest of 'len' bytes at
22 * 'input'. 'output' must have enough space to hold 16 bytes.
23 */
24void md5 (unsigned char *input, int len, unsigned char output[16]);
25
215b01bb
BS
26/*
27 * Calculate and store in 'output' the MD5 digest of 'len' bytes at 'input'.
28 * 'output' must have enough space to hold 16 bytes. If 'chunk' Trigger the
29 * watchdog every 'chunk_sz' bytes of input processed.
30 */
31void md5_wd (unsigned char *input, int len, unsigned char output[16],
32 unsigned int chunk_sz);
33
20a14a42 34#endif /* _MD5_H */