sphlib

sph_whirlpool.h

Go to the documentation of this file.
00001 /* $Id: sph_whirlpool.h 216 2010-06-08 09:46:57Z tp $ */
00048 #ifndef SPH_WHIRLPOOL_H__
00049 #define SPH_WHIRLPOOL_H__
00050 
00051 #include <stddef.h>
00052 #include "sph_types.h"
00053 
00054 #if SPH_64
00055 
00059 #define SPH_SIZE_whirlpool   512
00060 
00064 #define SPH_SIZE_whirlpool0   512
00065 
00069 #define SPH_SIZE_whirlpool1   512
00070 
00081 typedef struct {
00082 #ifndef DOXYGEN_IGNORE
00083         unsigned char buf[64];    /* first field, for alignment */
00084         sph_u64 state[8];
00085 #if SPH_64
00086         sph_u64 count;
00087 #else
00088         sph_u32 count_high, count_low;
00089 #endif
00090 #endif
00091 } sph_whirlpool_context;
00092 
00099 void sph_whirlpool_init(void *cc);
00100 
00110 void sph_whirlpool(void *cc, const void *data, size_t len);
00111 
00121 void sph_whirlpool_close(void *cc, void *dst);
00122 
00126 typedef sph_whirlpool_context sph_whirlpool0_context;
00127 
00128 #ifdef DOXYGEN_IGNORE
00129 
00136 void sph_whirlpool0_init(void *cc);
00137 #endif
00138 
00139 #ifndef DOXYGEN_IGNORE
00140 #define sph_whirlpool0_init   sph_whirlpool_init
00141 #endif
00142 
00152 void sph_whirlpool0(void *cc, const void *data, size_t len);
00153 
00163 void sph_whirlpool0_close(void *cc, void *dst);
00164 
00168 typedef sph_whirlpool_context sph_whirlpool1_context;
00169 
00170 #ifdef DOXYGEN_IGNORE
00171 
00178 void sph_whirlpool1_init(void *cc);
00179 #endif
00180 
00181 #ifndef DOXYGEN_IGNORE
00182 #define sph_whirlpool1_init   sph_whirlpool_init
00183 #endif
00184 
00194 void sph_whirlpool1(void *cc, const void *data, size_t len);
00195 
00205 void sph_whirlpool1_close(void *cc, void *dst);
00206 
00207 #endif
00208 
00209 #endif