Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

sph_shavite.h
Go to the documentation of this file.
1 /* $Id: sph_shavite.h 208 2010-06-02 20:33:00Z tp $ */
38 #ifndef SPH_SHAVITE_H__
39 #define SPH_SHAVITE_H__
40 
41 #include <stddef.h>
42 #include <crypto/sph_types.h>
43 
44 #ifdef __cplusplus
45 extern "C"{
46 #endif
47 
51 #define SPH_SIZE_shavite224 224
52 
56 #define SPH_SIZE_shavite256 256
57 
61 #define SPH_SIZE_shavite384 384
62 
66 #define SPH_SIZE_shavite512 512
67 
78 typedef struct {
79 #ifndef DOXYGEN_IGNORE
80  unsigned char buf[64]; /* first field, for alignment */
81  size_t ptr;
82  sph_u32 h[8];
83  sph_u32 count0, count1;
84 #endif
86 
92 
98 
109 typedef struct {
110 #ifndef DOXYGEN_IGNORE
111  unsigned char buf[128]; /* first field, for alignment */
112  size_t ptr;
113  sph_u32 h[16];
114  sph_u32 count0, count1, count2, count3;
115 #endif
117 
123 
129 
136 void sph_shavite224_init(void *cc);
137 
146 void sph_shavite224(void *cc, const void *data, size_t len);
147 
157 void sph_shavite224_close(void *cc, void *dst);
158 
173  void *cc, unsigned ub, unsigned n, void *dst);
174 
181 void sph_shavite256_init(void *cc);
182 
191 void sph_shavite256(void *cc, const void *data, size_t len);
192 
202 void sph_shavite256_close(void *cc, void *dst);
203 
218  void *cc, unsigned ub, unsigned n, void *dst);
219 
226 void sph_shavite384_init(void *cc);
227 
236 void sph_shavite384(void *cc, const void *data, size_t len);
237 
247 void sph_shavite384_close(void *cc, void *dst);
248 
263  void *cc, unsigned ub, unsigned n, void *dst);
264 
271 void sph_shavite512_init(void *cc);
272 
281 void sph_shavite512(void *cc, const void *data, size_t len);
282 
292 void sph_shavite512_close(void *cc, void *dst);
293 
308  void *cc, unsigned ub, unsigned n, void *dst);
309 
310 #ifdef __cplusplus
311 }
312 #endif
313 
314 #endif
void sph_shavite224_close(void *cc, void *dst)
Terminate the current SHAvite-224 computation and output the result into the provided buffer...
Definition: shavite.c:1658
void sph_shavite512(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: shavite.c:1741
void sph_shavite384_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: shavite.c:1726
sph_shavite_small_context sph_shavite224_context
This structure is a context for SHAvite-224 computations.
Definition: sph_shavite.h:91
Basic type definitions.
This structure is a context for SHAvite-384 and SHAvite-512 computations: it contains the intermediat...
Definition: sph_shavite.h:109
sph_shavite_big_context sph_shavite512_context
This structure is a context for SHAvite-512 computations.
Definition: sph_shavite.h:128
sph_shavite_big_context sph_shavite384_context
This structure is a context for SHAvite-384 computations.
Definition: sph_shavite.h:122
void sph_shavite256_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: shavite.c:1696
void sph_shavite512_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: shavite.c:1756
This structure is a context for SHAvite-224 and SHAvite-256 computations: it contains the intermediat...
Definition: sph_shavite.h:78
sph_shavite_small_context sph_shavite256_context
This structure is a context for SHAvite-256 computations.
Definition: sph_shavite.h:97
void sph_shavite512_init(void *cc)
Initialize a SHAvite-512 context.
Definition: shavite.c:1734
void sph_shavite224_init(void *cc)
Initialize a SHAvite-224 context.
Definition: shavite.c:1644
void sph_shavite256_close(void *cc, void *dst)
Terminate the current SHAvite-256 computation and output the result into the provided buffer...
Definition: shavite.c:1688
void sph_shavite384(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: shavite.c:1711
void sph_shavite224(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: shavite.c:1651
void sph_shavite512_close(void *cc, void *dst)
Terminate the current SHAvite-512 computation and output the result into the provided buffer...
Definition: shavite.c:1748
void sph_shavite384_close(void *cc, void *dst)
Terminate the current SHAvite-384 computation and output the result into the provided buffer...
Definition: shavite.c:1718
void sph_shavite384_init(void *cc)
Initialize a SHAvite-384 context.
Definition: shavite.c:1704
unsigned long sph_u32
Definition: sph_types.h:870
void sph_shavite256(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: shavite.c:1681
void sph_shavite224_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: shavite.c:1666
void sph_shavite256_init(void *cc)
Initialize a SHAvite-256 context.
Definition: shavite.c:1674
Released under the MIT license