Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
tpruvot
GitHub Repository: tpruvot/cpuminer-multi
Path: blob/linux/crypto/c_keccak.h
1201 views
1
// keccak.h
2
// 19-Nov-11 Markku-Juhani O. Saarinen <[email protected]>
3
4
#ifndef KECCAK_H
5
#define KECCAK_H
6
7
#include <stdint.h>
8
#include <string.h>
9
10
#ifndef KECCAK_ROUNDS
11
#define KECCAK_ROUNDS 24
12
#endif
13
14
#ifndef ROTL64
15
#define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y))))
16
#endif
17
18
// compute a keccak hash (md) of given byte length from "in"
19
int keccak(const uint8_t *in, int inlen, uint8_t *md, int mdlen);
20
21
// update the state
22
void keccakf(uint64_t st[25], int norounds);
23
24
void keccak1600(const uint8_t *in, int inlen, uint8_t *md);
25
26
#endif
27
28