Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

sph_simd.h
Go to the documentation of this file.
1 /* $Id: sph_simd.h 154 2010-04-26 17:00:24Z tp $ */
36 #ifndef SPH_SIMD_H__
37 #define SPH_SIMD_H__
38 
39 #ifdef __cplusplus
40 extern "C"{
41 #endif
42 
43 #include <stddef.h>
44 #include <crypto/sph_types.h>
45 
49 #define SPH_SIZE_simd224 224
50 
54 #define SPH_SIZE_simd256 256
55 
59 #define SPH_SIZE_simd384 384
60 
64 #define SPH_SIZE_simd512 512
65 
77 typedef struct {
78 #ifndef DOXYGEN_IGNORE
79  unsigned char buf[64]; /* first field, for alignment */
80  size_t ptr;
81  sph_u32 state[16];
82  sph_u32 count_low, count_high;
83 #endif
85 
97 typedef struct {
98 #ifndef DOXYGEN_IGNORE
99  unsigned char buf[128]; /* first field, for alignment */
100  size_t ptr;
101  sph_u32 state[32];
102  sph_u32 count_low, count_high;
103 #endif
105 
110 
115 
120 
125 
132 void sph_simd224_init(void *cc);
133 
142 void sph_simd224(void *cc, const void *data, size_t len);
143 
153 void sph_simd224_close(void *cc, void *dst);
154 
169  void *cc, unsigned ub, unsigned n, void *dst);
170 
177 void sph_simd256_init(void *cc);
178 
187 void sph_simd256(void *cc, const void *data, size_t len);
188 
198 void sph_simd256_close(void *cc, void *dst);
199 
214  void *cc, unsigned ub, unsigned n, void *dst);
215 
222 void sph_simd384_init(void *cc);
223 
232 void sph_simd384(void *cc, const void *data, size_t len);
233 
243 void sph_simd384_close(void *cc, void *dst);
244 
259  void *cc, unsigned ub, unsigned n, void *dst);
260 
267 void sph_simd512_init(void *cc);
268 
277 void sph_simd512(void *cc, const void *data, size_t len);
278 
288 void sph_simd512_close(void *cc, void *dst);
289 
304  void *cc, unsigned ub, unsigned n, void *dst);
305 #ifdef __cplusplus
306 }
307 #endif
308 
309 #endif
void sph_simd256(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: simd.c:1730
void sph_simd224_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: simd.c:1717
sph_simd_big_context sph_simd512_context
Type for a SIMD-512 context (identical to the common "big" context).
Definition: sph_simd.h:124
void sph_simd512_close(void *cc, void *dst)
Terminate the current SIMD-512 computation and output the result into the provided buffer...
Definition: simd.c:1786
This structure is a context for SIMD computations: it contains the intermediate values and some data ...
Definition: sph_simd.h:77
Basic type definitions.
void sph_simd224(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: simd.c:1705
void sph_simd384_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: simd.c:1767
void sph_simd512(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: simd.c:1780
void sph_simd384_close(void *cc, void *dst)
Terminate the current SIMD-384 computation and output the result into the provided buffer...
Definition: simd.c:1761
This structure is a context for SIMD computations: it contains the intermediate values and some data ...
Definition: sph_simd.h:97
void sph_simd384(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: simd.c:1755
void sph_simd256_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: simd.c:1742
void sph_simd512_init(void *cc)
Initialize an SIMD-512 context.
Definition: simd.c:1774
sph_simd_big_context sph_simd384_context
Type for a SIMD-384 context (identical to the common "big" context).
Definition: sph_simd.h:119
void sph_simd256_close(void *cc, void *dst)
Terminate the current SIMD-256 computation and output the result into the provided buffer...
Definition: simd.c:1736
void sph_simd224_init(void *cc)
Initialize an SIMD-224 context.
Definition: simd.c:1699
void sph_simd512_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: simd.c:1792
unsigned long sph_u32
Definition: sph_types.h:870
sph_simd_small_context sph_simd256_context
Type for a SIMD-256 context (identical to the common "small" context).
Definition: sph_simd.h:114
sph_simd_small_context sph_simd224_context
Type for a SIMD-224 context (identical to the common "small" context).
Definition: sph_simd.h:109
void sph_simd384_init(void *cc)
Initialize an SIMD-384 context.
Definition: simd.c:1749
void sph_simd256_init(void *cc)
Initialize an SIMD-256 context.
Definition: simd.c:1724
void sph_simd224_close(void *cc, void *dst)
Terminate the current SIMD-224 computation and output the result into the provided buffer...
Definition: simd.c:1711
Released under the MIT license