sphlib

sph_md5.h

Go to the documentation of this file.
00001 /* $Id: sph_md5.h 216 2010-06-08 09:46:57Z tp $ */
00040 #ifndef SPH_MD5_H__
00041 #define SPH_MD5_H__
00042 
00043 #include <stddef.h>
00044 #include "sph_types.h"
00045 
00049 #define SPH_SIZE_md5   128
00050 
00061 typedef struct {
00062 #ifndef DOXYGEN_IGNORE
00063         unsigned char buf[64];    /* first field, for alignment */
00064         sph_u32 val[4];
00065 #if SPH_64
00066         sph_u64 count;
00067 #else
00068         sph_u32 count_high, count_low;
00069 #endif
00070 #endif
00071 } sph_md5_context;
00072 
00078 void sph_md5_init(void *cc);
00079 
00088 void sph_md5(void *cc, const void *data, size_t len);
00089 
00099 void sph_md5_close(void *cc, void *dst);
00100 
00114 void sph_md5_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst);
00115 
00127 void sph_md5_comp(const sph_u32 msg[16], sph_u32 val[4]);
00128 
00129 #endif