Fabcoin Core  0.16.2
P2P Digital Currency
sha3.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #include "compiler.h"
8 #include <stdint.h>
9 #include <stdlib.h>
10 
11 struct ethash_h256;
12 
13 #define decsha3(bits) \
14  int sha3_##bits(uint8_t*, size_t, uint8_t const*, size_t);
15 
16 decsha3(256)
17 decsha3(512)
18 
19 static inline void SHA3_256(struct ethash_h256 const* ret, uint8_t const* data, size_t const size)
20 {
21  sha3_256((uint8_t*)ret, 32, data, size);
22 }
23 
24 static inline void SHA3_512(uint8_t* ret, uint8_t const* data, size_t const size)
25 {
26  sha3_512(ret, 64, data, size);
27 }
28 
29 #ifdef __cplusplus
30 }
31 #endif
SHA3-256 message digest.
SHA3_Final< 64 > SHA3_512
Definition: sha3.h:89
Type of a seedhash/blockhash e.t.c.
Definition: ethash.h:48
uint8_t const size_t const size
Definition: sha3.h:20
#define decsha3(bits)
Definition: sha3.h:13
uint8_t const * data
Definition: sha3.h:19