1*20a14a42SAndy Fleming /* 2*20a14a42SAndy Fleming * This file was transplanted with slight modifications from Linux sources 3*20a14a42SAndy Fleming * (fs/cifs/md5.h) into U-Boot by Bartlomiej Sieka <tur@semihalf.com>. 4*20a14a42SAndy Fleming */ 5*20a14a42SAndy Fleming 6*20a14a42SAndy Fleming #ifndef _MD5_H 7*20a14a42SAndy Fleming #define _MD5_H 8*20a14a42SAndy Fleming 9*20a14a42SAndy Fleming #include <linux/types.h> 10*20a14a42SAndy Fleming 11*20a14a42SAndy Fleming struct MD5Context { 12*20a14a42SAndy Fleming __u32 buf[4]; 13*20a14a42SAndy Fleming __u32 bits[2]; 14*20a14a42SAndy Fleming unsigned char in[64]; 15*20a14a42SAndy Fleming }; 16*20a14a42SAndy Fleming 17*20a14a42SAndy Fleming /* 18*20a14a42SAndy Fleming * Calculate and store in 'output' the MD5 digest of 'len' bytes at 19*20a14a42SAndy Fleming * 'input'. 'output' must have enough space to hold 16 bytes. 20*20a14a42SAndy Fleming */ 21*20a14a42SAndy Fleming void md5 (unsigned char *input, int len, unsigned char output[16]); 22*20a14a42SAndy Fleming 23*20a14a42SAndy Fleming #endif /* _MD5_H */ 24