Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

sph_echo.h
Go to the documentation of this file.
1 /* $Id: sph_echo.h 216 2010-06-08 09:46:57Z tp $ */
36 #ifndef SPH_ECHO_H__
37 #define SPH_ECHO_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_echo224 224
50 
54 #define SPH_SIZE_echo256 256
55 
59 #define SPH_SIZE_echo384 384
60 
64 #define SPH_SIZE_echo512 512
65 
77 typedef struct {
78 #ifndef DOXYGEN_IGNORE
79  unsigned char buf[192]; /* first field, for alignment */
80  size_t ptr;
81  union {
82  sph_u32 Vs[4][4];
83 #if SPH_64
84  sph_u64 Vb[4][2];
85 #endif
86  } u;
87  sph_u32 C0, C1, C2, C3;
88 #endif
90 
102 typedef struct {
103 #ifndef DOXYGEN_IGNORE
104  unsigned char buf[128]; /* first field, for alignment */
105  size_t ptr;
106  union {
107  sph_u32 Vs[8][4];
108 #if SPH_64
109  sph_u64 Vb[8][2];
110 #endif
111  } u;
112  sph_u32 C0, C1, C2, C3;
113 #endif
115 
120 
125 
130 
135 
142 void sph_echo224_init(void *cc);
143 
152 void sph_echo224(void *cc, const void *data, size_t len);
153 
163 void sph_echo224_close(void *cc, void *dst);
164 
179  void *cc, unsigned ub, unsigned n, void *dst);
180 
187 void sph_echo256_init(void *cc);
188 
197 void sph_echo256(void *cc, const void *data, size_t len);
198 
208 void sph_echo256_close(void *cc, void *dst);
209 
224  void *cc, unsigned ub, unsigned n, void *dst);
225 
232 void sph_echo384_init(void *cc);
233 
242 void sph_echo384(void *cc, const void *data, size_t len);
243 
253 void sph_echo384_close(void *cc, void *dst);
254 
269  void *cc, unsigned ub, unsigned n, void *dst);
270 
277 void sph_echo512_init(void *cc);
278 
287 void sph_echo512(void *cc, const void *data, size_t len);
288 
298 void sph_echo512_close(void *cc, void *dst);
299 
314  void *cc, unsigned ub, unsigned n, void *dst);
315 
316 #ifdef __cplusplus
317 }
318 #endif
319 
320 #endif
This structure is a context for ECHO computations: it contains the intermediate values and some data ...
Definition: sph_echo.h:102
void sph_echo224_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: echo.c:941
void sph_echo256_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: echo.c:969
void sph_echo256_close(void *cc, void *dst)
Terminate the current ECHO-256 computation and output the result into the provided buffer...
Definition: echo.c:962
Basic type definitions.
void sph_echo384(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: echo.c:983
void sph_echo512_close(void *cc, void *dst)
Terminate the current ECHO-512 computation and output the result into the provided buffer...
Definition: echo.c:1018
void sph_echo224_init(void *cc)
Initialize an ECHO-224 context.
Definition: echo.c:920
sph_echo_big_context sph_echo512_context
Type for a ECHO-512 context (identical to the common "big" context).
Definition: sph_echo.h:134
void sph_echo512(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: echo.c:1011
void sph_echo512_init(void *cc)
Initialize an ECHO-512 context.
Definition: echo.c:1004
void sph_echo384_init(void *cc)
Initialize an ECHO-384 context.
Definition: echo.c:976
void sph_echo256(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: echo.c:955
sph_echo_big_context sph_echo384_context
Type for a ECHO-384 context (identical to the common "big" context).
Definition: sph_echo.h:129
void sph_echo384_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: echo.c:997
sph_echo_small_context sph_echo224_context
Type for a ECHO-224 context (identical to the common "small" context).
Definition: sph_echo.h:119
void sph_echo224(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: echo.c:927
void sph_echo256_init(void *cc)
Initialize an ECHO-256 context.
Definition: echo.c:948
unsigned long sph_u32
Definition: sph_types.h:870
void sph_echo384_close(void *cc, void *dst)
Terminate the current ECHO-384 computation and output the result into the provided buffer...
Definition: echo.c:990
void sph_echo224_close(void *cc, void *dst)
Terminate the current ECHO-224 computation and output the result into the provided buffer...
Definition: echo.c:934
void sph_echo512_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: echo.c:1025
sph_echo_small_context sph_echo256_context
Type for a ECHO-256 context (identical to the common "small" context).
Definition: sph_echo.h:124
This structure is a context for ECHO computations: it contains the intermediate values and some data ...
Definition: sph_echo.h:77
Released under the MIT license