Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

sph_groestl.h
Go to the documentation of this file.
1 /* $Id: sph_groestl.h 216 2010-06-08 09:46:57Z tp $ */
35 #ifndef SPH_GROESTL_H__
36 #define SPH_GROESTL_H__
37 
38 #ifdef __cplusplus
39 extern "C"{
40 #endif
41 
42 #include <stddef.h>
43 #include <crypto/sph_types.h>
44 
48 #define SPH_SIZE_groestl224 224
49 
53 #define SPH_SIZE_groestl256 256
54 
58 #define SPH_SIZE_groestl384 384
59 
63 #define SPH_SIZE_groestl512 512
64 
75 typedef struct {
76 #ifndef DOXYGEN_IGNORE
77  unsigned char buf[64]; /* first field, for alignment */
78  size_t ptr;
79  union {
80 #if SPH_64
81  sph_u64 wide[8];
82 #endif
83  sph_u32 narrow[16];
84  } state;
85 #if SPH_64
86  sph_u64 count;
87 #else
88  sph_u32 count_high, count_low;
89 #endif
90 #endif
92 
98 
104 
115 typedef struct {
116 #ifndef DOXYGEN_IGNORE
117  unsigned char buf[128]; /* first field, for alignment */
118  size_t ptr;
119  union {
120 #if SPH_64
121  sph_u64 wide[16];
122 #endif
123  sph_u32 narrow[32];
124  } state;
125 #if SPH_64
126  sph_u64 count;
127 #else
128  sph_u32 count_high, count_low;
129 #endif
130 #endif
132 
138 
144 
151 void sph_groestl224_init(void *cc);
152 
161 void sph_groestl224(void *cc, const void *data, size_t len);
162 
172 void sph_groestl224_close(void *cc, void *dst);
173 
188  void *cc, unsigned ub, unsigned n, void *dst);
189 
196 void sph_groestl256_init(void *cc);
197 
206 void sph_groestl256(void *cc, const void *data, size_t len);
207 
217 void sph_groestl256_close(void *cc, void *dst);
218 
233  void *cc, unsigned ub, unsigned n, void *dst);
234 
241 void sph_groestl384_init(void *cc);
242 
251 void sph_groestl384(void *cc, const void *data, size_t len);
252 
262 void sph_groestl384_close(void *cc, void *dst);
263 
278  void *cc, unsigned ub, unsigned n, void *dst);
279 
286 void sph_groestl512_init(void *cc);
287 
296 void sph_groestl512(void *cc, const void *data, size_t len);
297 
307 void sph_groestl512_close(void *cc, void *dst);
308 
323  void *cc, unsigned ub, unsigned n, void *dst);
324 
325 #ifdef __cplusplus
326 }
327 #endif
328 
329 #endif
void sph_groestl256(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: groestl.c:3046
void sph_groestl512_init(void *cc)
Initialize a Groestl-512 context.
Definition: groestl.c:3095
sph_groestl_big_context sph_groestl384_context
This structure is a context for Groestl-384 computations.
Definition: sph_groestl.h:137
Basic type definitions.
void sph_groestl224_init(void *cc)
Initialize a Groestl-224 context.
Definition: groestl.c:3011
void sph_groestl256_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
Add a few additional bits (0 to 7) to the current computation, then terminate it and output the resul...
Definition: groestl.c:3060
void sph_groestl384_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
Add a few additional bits (0 to 7) to the current computation, then terminate it and output the resul...
Definition: groestl.c:3088
void sph_groestl512(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: groestl.c:3102
void sph_groestl224_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
Add a few additional bits (0 to 7) to the current computation, then terminate it and output the resul...
Definition: groestl.c:3032
void sph_groestl512_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst)
Add a few additional bits (0 to 7) to the current computation, then terminate it and output the resul...
Definition: groestl.c:3116
sph_groestl_small_context sph_groestl224_context
This structure is a context for Groestl-224 computations.
Definition: sph_groestl.h:97
void sph_groestl384_init(void *cc)
Initialize a Groestl-384 context.
Definition: groestl.c:3067
void sph_groestl384_close(void *cc, void *dst)
Terminate the current Groestl-384 computation and output the result into the provided buffer...
Definition: groestl.c:3081
void sph_groestl256_init(void *cc)
Initialize a Groestl-256 context.
Definition: groestl.c:3039
sph_groestl_small_context sph_groestl256_context
This structure is a context for Groestl-256 computations.
Definition: sph_groestl.h:103
void sph_groestl512_close(void *cc, void *dst)
Terminate the current Groestl-512 computation and output the result into the provided buffer...
Definition: groestl.c:3109
void sph_groestl256_close(void *cc, void *dst)
Terminate the current Groestl-256 computation and output the result into the provided buffer...
Definition: groestl.c:3053
This structure is a context for Groestl-224 and Groestl-256 computations: it contains the intermediat...
Definition: sph_groestl.h:75
unsigned long sph_u32
Definition: sph_types.h:870
void sph_groestl224(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: groestl.c:3018
static int count
Definition: tests.c:45
void sph_groestl224_close(void *cc, void *dst)
Terminate the current Groestl-224 computation and output the result into the provided buffer...
Definition: groestl.c:3025
void sph_groestl384(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: groestl.c:3074
This structure is a context for Groestl-384 and Groestl-512 computations: it contains the intermediat...
Definition: sph_groestl.h:115
sph_groestl_big_context sph_groestl512_context
This structure is a context for Groestl-512 computations.
Definition: sph_groestl.h:143
Released under the MIT license