Kagome
Polkadot Runtime Engine in C++17
|
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "crypto/keccak/keccak.h"
#include "macro/endianness_utils.hpp"
Go to the source code of this file.
Macros | |
#define | SHA3_ASSERT(x) |
#define | SHA3_TRACE(format, args...) |
#define | SHA3_TRACE_BUF(format, buf, l, args...) |
#define | SHA3_USE_KECCAK_FLAG 0x80000000 |
#define | SHA3_CW(x) ((x) & (~SHA3_USE_KECCAK_FLAG)) |
#define | SHA3_CONST(x) x##L |
#define | SHA3_ROTL64(x, y) (((x) << (y)) | ((x) >> ((sizeof(uint64_t) * 8) - (y)))) |
#define | KECCAK_ROUNDS 24 |
Functions | |
void | keccakf (uint64_t s[25]) |
sha3_return_t | sha3_Init (void *priv, unsigned bitSize) |
void | sha3_Init256 (void *priv) |
void | sha3_Init384 (void *priv) |
void | sha3_Init512 (void *priv) |
enum SHA3_FLAGS | sha3_SetFlags (void *priv, enum SHA3_FLAGS flags) |
void | sha3_Update (void *priv, void const *bufIn, size_t len) |
void const * | sha3_Finalize (void *priv) |
sha3_return_t | sha3_HashBuffer (unsigned bitSize, enum SHA3_FLAGS flags, const void *in, unsigned inBytes, void *out, unsigned outBytes) |
Variables | |
static const uint64_t | keccakf_rndc [24] |
static const unsigned | keccakf_rotc [24] |
static const unsigned | keccakf_piln [24] |
#define KECCAK_ROUNDS 24 |
#define SHA3_ASSERT | ( | x | ) |
#define SHA3_CW | ( | x | ) | ((x) & (~SHA3_USE_KECCAK_FLAG)) |
#define SHA3_ROTL64 | ( | x, | |
y | |||
) | (((x) << (y)) | ((x) >> ((sizeof(uint64_t) * 8) - (y)))) |
sha3_return_t sha3_HashBuffer | ( | unsigned | bitSize, |
enum SHA3_FLAGS | flags, | ||
const void * | in, | ||
unsigned | inBytes, | ||
void * | out, | ||
unsigned | outBytes | ||
) |
sha3_return_t sha3_Init | ( | void * | priv, |
unsigned | bitSize | ||
) |
enum SHA3_FLAGS sha3_SetFlags | ( | void * | priv, |
enum SHA3_FLAGS | flags | ||
) |
void sha3_Update | ( | void * | priv, |
void const * | bufIn, | ||
size_t | len | ||
) |
|
static |
|
static |