Raven Core  3.0.0
P2P Digital Currency
sph_whirlpool.h
Go to the documentation of this file.
1 /* $Id: sph_whirlpool.h 216 2010-06-08 09:46:57Z tp $ */
48 #ifndef SPH_WHIRLPOOL_H__
49 #define SPH_WHIRLPOOL_H__
50 
51 #include <stddef.h>
52 #include "sph_types.h"
53 
54 #ifdef __cplusplus
55 extern "C"{
56 #endif
57 
58 #if SPH_64
59 
63 #define SPH_SIZE_whirlpool 512
64 
68 #define SPH_SIZE_whirlpool0 512
69 
73 #define SPH_SIZE_whirlpool1 512
74 
85 typedef struct {
86 #ifndef DOXYGEN_IGNORE
87  unsigned char buf[64]; /* first field, for alignment */
88  sph_u64 state[8];
89 #if SPH_64
90  sph_u64 count;
91 #else
92  sph_u32 count_high, count_low;
93 #endif
94 #endif
95 } sph_whirlpool_context;
96 
103 void sph_whirlpool_init(void *cc);
104 
114 void sph_whirlpool(void *cc, const void *data, size_t len);
115 
125 void sph_whirlpool_close(void *cc, void *dst);
126 
130 typedef sph_whirlpool_context sph_whirlpool0_context;
131 
132 #ifdef DOXYGEN_IGNORE
133 
140 void sph_whirlpool0_init(void *cc);
141 #endif
142 
143 #ifndef DOXYGEN_IGNORE
144 #define sph_whirlpool0_init sph_whirlpool_init
145 #endif
146 
156 void sph_whirlpool0(void *cc, const void *data, size_t len);
157 
167 void sph_whirlpool0_close(void *cc, void *dst);
168 
172 typedef sph_whirlpool_context sph_whirlpool1_context;
173 
174 #ifdef DOXYGEN_IGNORE
175 
182 void sph_whirlpool1_init(void *cc);
183 #endif
184 
185 #ifndef DOXYGEN_IGNORE
186 #define sph_whirlpool1_init sph_whirlpool_init
187 #endif
188 
198 void sph_whirlpool1(void *cc, const void *data, size_t len);
199 
209 void sph_whirlpool1_close(void *cc, void *dst);
210 
211 #endif
212 
213 #endif
214 
215 #ifdef __cplusplus
216 }
217 #endif
Basic type definitions.
void sph_whirlpool_init(void *cc)
unsigned long sph_u32
Definition: sph_types.h:870