diff options
author | Matthew Wampler-Doty <matthew.wampler.doty@gmail.com> | 2015-03-01 03:58:37 +0800 |
---|---|---|
committer | Matthew Wampler-Doty <matthew.wampler.doty@gmail.com> | 2015-03-03 11:29:34 +0800 |
commit | de9f79133faa1ff5dcd16fb4fd13d06b7799ded9 (patch) | |
tree | fcc9001d6b681ccdd1b3bbe516e3611e808341d7 /Godeps/_workspace/src/github.com/ethereum/ethash/libethash/sha3.h | |
parent | 080823bdeebbab2bcffdaefad703896700ed2c30 (diff) | |
download | go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.tar.gz go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.tar.zst go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.zip |
Introducing ethash
Diffstat (limited to 'Godeps/_workspace/src/github.com/ethereum/ethash/libethash/sha3.h')
-rw-r--r-- | Godeps/_workspace/src/github.com/ethereum/ethash/libethash/sha3.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/libethash/sha3.h b/Godeps/_workspace/src/github.com/ethereum/ethash/libethash/sha3.h new file mode 100644 index 000000000..36a0a5301 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/libethash/sha3.h @@ -0,0 +1,27 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "compiler.h" +#include <stdint.h> +#include <stdlib.h> + +#define decsha3(bits) \ + int sha3_##bits(uint8_t*, size_t, const uint8_t*, size_t); + +decsha3(256) +decsha3(512) + +static inline void SHA3_256(uint8_t * const ret, uint8_t const *data, const size_t size) { + sha3_256(ret, 32, data, size); +} + +static inline void SHA3_512(uint8_t * const ret, uint8_t const *data, const size_t size) { + sha3_512(ret, 64, data, size); +} + +#ifdef __cplusplus +} +#endif
\ No newline at end of file |