Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

sph_keccak.h
Go to the documentation of this file.
1 /* $Id: sph_keccak.h 216 2010-06-08 09:46:57Z tp $ */
36 #ifndef SPH_KECCAK_H__
37 #define SPH_KECCAK_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_keccak224 224
50 
54 #define SPH_SIZE_keccak256 256
55 
59 #define SPH_SIZE_keccak384 384
60 
64 #define SPH_SIZE_keccak512 512
65 
76 typedef struct {
77 #ifndef DOXYGEN_IGNORE
78  unsigned char buf[144]; /* first field, for alignment */
79  size_t ptr, lim;
80  union {
81 #if SPH_64
82  sph_u64 wide[25];
83 #endif
84  sph_u32 narrow[50];
85  } u;
86 #endif
88 
93 
98 
103 
108 
115 void sph_keccak224_init(void *cc);
116 
125 void sph_keccak224(void *cc, const void *data, size_t len);
126 
136 void sph_keccak224_close(void *cc, void *dst);
137 
152  void *cc, unsigned ub, unsigned n, void *dst);
153 
160 void sph_keccak256_init(void *cc);
161 
170 void sph_keccak256(void *cc, const void *data, size_t len);
171 
181 void sph_keccak256_close(void *cc, void *dst);
182 
197  void *cc, unsigned ub, unsigned n, void *dst);
198 
205 void sph_keccak384_init(void *cc);
206 
215 void sph_keccak384(void *cc, const void *data, size_t len);
216 
226 void sph_keccak384_close(void *cc, void *dst);
227 
242  void *cc, unsigned ub, unsigned n, void *dst);
243 
250 void sph_keccak512_init(void *cc);
251 
260 void sph_keccak512(void *cc, const void *data, size_t len);
261 
271 void sph_keccak512_close(void *cc, void *dst);
272 
287  void *cc, unsigned ub, unsigned n, void *dst);
288 
289 #ifdef __cplusplus
290 }
291 #endif
292 
293 #endif
void sph_keccak384_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: keccak.c:1788
Basic type definitions.
sph_keccak_context sph_keccak256_context
Type for a Keccak-256 context (identical to the common context).
Definition: sph_keccak.h:97
sph_keccak_context sph_keccak224_context
Type for a Keccak-224 context (identical to the common context).
Definition: sph_keccak.h:92
void sph_keccak512_init(void *cc)
Initialize a Keccak-512 context.
Definition: keccak.c:1795
void sph_keccak512_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: keccak.c:1816
void sph_keccak256(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: keccak.c:1746
void sph_keccak256_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: keccak.c:1760
void sph_keccak256_init(void *cc)
Initialize a Keccak-256 context.
Definition: keccak.c:1739
void sph_keccak512(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: keccak.c:1802
void sph_keccak224_close(void *cc, void *dst)
Terminate the current Keccak-224 computation and output the result into the provided buffer...
Definition: keccak.c:1725
sph_keccak_context sph_keccak384_context
Type for a Keccak-384 context (identical to the common context).
Definition: sph_keccak.h:102
void sph_keccak224_init(void *cc)
Initialize a Keccak-224 context.
Definition: keccak.c:1711
void sph_keccak224(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: keccak.c:1718
sph_keccak_context sph_keccak512_context
Type for a Keccak-512 context (identical to the common context).
Definition: sph_keccak.h:107
void sph_keccak384(void *cc, const void *data, size_t len)
Process some data bytes.
Definition: keccak.c:1774
void sph_keccak384_init(void *cc)
Initialize a Keccak-384 context.
Definition: keccak.c:1767
unsigned long sph_u32
Definition: sph_types.h:870
void sph_keccak224_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: keccak.c:1732
void sph_keccak256_close(void *cc, void *dst)
Terminate the current Keccak-256 computation and output the result into the provided buffer...
Definition: keccak.c:1753
This structure is a context for Keccak computations: it contains the intermediate values and some dat...
Definition: sph_keccak.h:76
void sph_keccak512_close(void *cc, void *dst)
Terminate the current Keccak-512 computation and output the result into the provided buffer...
Definition: keccak.c:1809
void sph_keccak384_close(void *cc, void *dst)
Terminate the current Keccak-384 computation and output the result into the provided buffer...
Definition: keccak.c:1781
Released under the MIT license