Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

sph_skein.h
Go to the documentation of this file.
1 /* $Id: sph_skein.h 253 2011-06-07 18:33:10Z tp $ */
41 #ifndef SPH_SKEIN_H__
42 #define SPH_SKEIN_H__
43 
44 #ifdef __cplusplus
45 extern "C"{
46 #endif
47 
48 #include <stddef.h>
49 #include <crypto/sph_types.h>
50 
51 #if SPH_64
52 
56 #define SPH_SIZE_skein224 224
57 
61 #define SPH_SIZE_skein256 256
62 
66 #define SPH_SIZE_skein384 384
67 
71 #define SPH_SIZE_skein512 512
72 
83 typedef struct {
84 #ifndef DOXYGEN_IGNORE
85  unsigned char buf[64]; /* first field, for alignment */
86  size_t ptr;
87  sph_u64 h0, h1, h2, h3, h4, h5, h6, h7;
88  sph_u64 bcount;
89 #endif
90 } sph_skein_big_context;
91 
95 typedef sph_skein_big_context sph_skein224_context;
96 
100 typedef sph_skein_big_context sph_skein256_context;
101 
105 typedef sph_skein_big_context sph_skein384_context;
106 
110 typedef sph_skein_big_context sph_skein512_context;
111 
118 void sph_skein224_init(void *cc);
119 
128 void sph_skein224(void *cc, const void *data, size_t len);
129 
139 void sph_skein224_close(void *cc, void *dst);
140 
154 void sph_skein224_addbits_and_close(
155  void *cc, unsigned ub, unsigned n, void *dst);
156 
163 void sph_skein256_init(void *cc);
164 
173 void sph_skein256(void *cc, const void *data, size_t len);
174 
184 void sph_skein256_close(void *cc, void *dst);
185 
199 void sph_skein256_addbits_and_close(
200  void *cc, unsigned ub, unsigned n, void *dst);
201 
208 void sph_skein384_init(void *cc);
209 
218 void sph_skein384(void *cc, const void *data, size_t len);
219 
229 void sph_skein384_close(void *cc, void *dst);
230 
244 void sph_skein384_addbits_and_close(
245  void *cc, unsigned ub, unsigned n, void *dst);
246 
253 void sph_skein512_init(void *cc);
254 
263 void sph_skein512(void *cc, const void *data, size_t len);
264 
274 void sph_skein512_close(void *cc, void *dst);
275 
289 void sph_skein512_addbits_and_close(
290  void *cc, unsigned ub, unsigned n, void *dst);
291 
292 #endif
293 
294 #ifdef __cplusplus
295 }
296 #endif
297 
298 #endif
Basic type definitions.
Released under the MIT license