Raven Core  3.0.0
P2P Digital Currency
sph_shabal.h
Go to the documentation of this file.
1 /* $Id: sph_shabal.h 175 2010-05-07 16:03:20Z tp $ */
36 #ifndef SPH_SHABAL_H__
37 #define SPH_SHABAL_H__
38 
39 #include <stddef.h>
40 #include "sph_types.h"
41 #ifdef __cplusplus
42 extern "C"{
43 #endif
44 
48 #define SPH_SIZE_shabal192 192
49 
53 #define SPH_SIZE_shabal224 224
54 
58 #define SPH_SIZE_shabal256 256
59 
63 #define SPH_SIZE_shabal384 384
64 
68 #define SPH_SIZE_shabal512 512
69 
80 typedef struct {
81 #ifndef DOXYGEN_IGNORE
82  unsigned char buf[64]; /* first field, for alignment */
83  size_t ptr;
84  sph_u32 A[12], B[16], C[16];
85  sph_u32 Whigh, Wlow;
86 #endif
88 
93 
98 
103 
108 
113 
120 void sph_shabal192_init(void *cc);
121 
130 void sph_shabal192(void *cc, const void *data, size_t len);
131 
141 void sph_shabal192_close(void *cc, void *dst);
142 
157  void *cc, unsigned ub, unsigned n, void *dst);
158 
165 void sph_shabal224_init(void *cc);
166 
175 void sph_shabal224(void *cc, const void *data, size_t len);
176 
186 void sph_shabal224_close(void *cc, void *dst);
187 
202  void *cc, unsigned ub, unsigned n, void *dst);
203 
210 void sph_shabal256_init(void *cc);
211 
220 void sph_shabal256(void *cc, const void *data, size_t len);
221 
231 void sph_shabal256_close(void *cc, void *dst);
232 
247  void *cc, unsigned ub, unsigned n, void *dst);
248 
255 void sph_shabal384_init(void *cc);
256 
265 void sph_shabal384(void *cc, const void *data, size_t len);
266 
276 void sph_shabal384_close(void *cc, void *dst);
277 
292  void *cc, unsigned ub, unsigned n, void *dst);
293 
300 void sph_shabal512_init(void *cc);
301 
310 void sph_shabal512(void *cc, const void *data, size_t len);
311 
321 void sph_shabal512_close(void *cc, void *dst);
322 
337  void *cc, unsigned ub, unsigned n, void *dst);
338 
339 #ifdef __cplusplus
340 }
341 #endif
342 
343 #endif
void sph_shabal384_close(void *cc, void *dst)
Terminate the current Shabal-384 computation and output the result into the provided buffer...
sph_shabal_context sph_shabal224_context
Type for a Shabal-224 context (identical to the common context).
Definition: sph_shabal.h:97
Basic type definitions.
void sph_shabal512_init(void *cc)
Initialize a Shabal-512 context.
Definition: sph_shabal.c:781
void sph_shabal192(void *cc, const void *data, size_t len)
Process some data bytes.
void sph_shabal256(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: sph_shabal.c:730
void sph_shabal192_init(void *cc)
Initialize a Shabal-192 context.
void sph_shabal384_init(void *cc)
Initialize a Shabal-384 context.
void sph_shabal512_close(void *cc, void *dst)
Terminate the current Shabal-512 computation and output the result into the provided buffer...
Definition: sph_shabal.c:795
void sph_shabal256_init(void *cc)
Initialize a Shabal-256 context.
Definition: sph_shabal.c:723
sph_shabal_context sph_shabal256_context
Type for a Shabal-256 context (identical to the common context).
Definition: sph_shabal.h:102
void sph_shabal512_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: sph_shabal.c:802
This structure is a context for Shabal computations: it contains the intermediate values and some dat...
Definition: sph_shabal.h:80
void sph_shabal224(void *cc, const void *data, size_t len)
Process some data bytes.
sph_shabal_context sph_shabal384_context
Type for a Shabal-384 context (identical to the common context).
Definition: sph_shabal.h:107
void sph_shabal256_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: sph_shabal.c:744
void sph_shabal224_init(void *cc)
Initialize a Shabal-224 context.
void sph_shabal192_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...
void sph_shabal512(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: sph_shabal.c:788
void sph_shabal192_close(void *cc, void *dst)
Terminate the current Shabal-192 computation and output the result into the provided buffer...
unsigned long sph_u32
Definition: sph_types.h:870
void sph_shabal384(void *cc, const void *data, size_t len)
Process some data bytes.
void sph_shabal256_close(void *cc, void *dst)
Terminate the current Shabal-256 computation and output the result into the provided buffer...
Definition: sph_shabal.c:737
void sph_shabal384_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...
sph_shabal_context sph_shabal512_context
Type for a Shabal-512 context (identical to the common context).
Definition: sph_shabal.h:112
void sph_shabal224_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...
sph_shabal_context sph_shabal192_context
Type for a Shabal-192 context (identical to the common context).
Definition: sph_shabal.h:92
void sph_shabal224_close(void *cc, void *dst)
Terminate the current Shabal-224 computation and output the result into the provided buffer...