blob: 08924cce3cf0b520d64f922dcb61953c9fa9f58a [file] [log] [blame]
Andy Fleming72c23be2008-04-02 16:19:07 -05001/*
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
Mike Frysinger4ad8e9f2009-07-02 19:23:25 -04009#include "compiler.h"
Andy Fleming72c23be2008-04-02 16:19:07 -050010
11struct MD5Context {
12 __u32 buf[4];
13 __u32 bits[2];
14 unsigned char in[64];
15};
16
17/*
18 * Calculate and store in 'output' the MD5 digest of 'len' bytes at
19 * 'input'. 'output' must have enough space to hold 16 bytes.
20 */
21void md5 (unsigned char *input, int len, unsigned char output[16]);
22
Bartlomiej Siekada5045d2008-04-22 12:27:56 +020023/*
24 * Calculate and store in 'output' the MD5 digest of 'len' bytes at 'input'.
25 * 'output' must have enough space to hold 16 bytes. If 'chunk' Trigger the
26 * watchdog every 'chunk_sz' bytes of input processed.
27 */
28void md5_wd (unsigned char *input, int len, unsigned char output[16],
29 unsigned int chunk_sz);
30
Andy Fleming72c23be2008-04-02 16:19:07 -050031#endif /* _MD5_H */