Kagome
Polkadot Runtime Engine in C++17
keccak.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sha3_context_
 
union  sha3_context_.__unnamed__
 

Macros

#define SHA3_KECCAK_SPONGE_WORDS   (((1600) / 8 /*bits to byte*/) / sizeof(uint64_t))
 

Typedefs

typedef struct sha3_context_ sha3_context
 
typedef enum SHA3_RETURN sha3_return_t
 

Enumerations

enum  SHA3_FLAGS { SHA3_FLAGS_NONE = 0, SHA3_FLAGS_KECCAK = 1 }
 
enum  SHA3_RETURN { SHA3_RETURN_OK = 0, SHA3_RETURN_BAD_PARAMS = 1 }
 

Functions

sha3_return_t sha3_Init (void *priv, unsigned bitSize)
 
void keccakf (uint64_t s[25])
 
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)
 
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)
 

Class Documentation

struct sha3_context_

Definition at line 16 of file keccak.h.

Collaboration diagram for sha3_context_:
Class Members
union sha3_context_ __unnamed__
unsigned byteIndex
unsigned capacityWords
uint64_t saved
unsigned wordIndex
union sha3_context_.__unnamed__

Definition at line 19 of file keccak.h.

Collaboration diagram for sha3_context_.__unnamed__:
Class Members
uint64_t s[SHA3_KECCAK_SPONGE_WORDS]
uint8_t sb[SHA3_KECCAK_SPONGE_WORDS *8]

Macro Definition Documentation

#define SHA3_KECCAK_SPONGE_WORDS   (((1600) / 8 /*bits to byte*/) / sizeof(uint64_t))

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Definition at line 14 of file keccak.h.

Typedef Documentation

typedef struct sha3_context_ sha3_context
typedef enum SHA3_RETURN sha3_return_t

Definition at line 34 of file keccak.h.

Enumeration Type Documentation

enum SHA3_FLAGS
Enumerator
SHA3_FLAGS_NONE 
SHA3_FLAGS_KECCAK 

Definition at line 31 of file keccak.h.

Enumerator
SHA3_RETURN_OK 
SHA3_RETURN_BAD_PARAMS 

Definition at line 33 of file keccak.h.

Function Documentation

void keccakf ( uint64_t  s[25])

Definition at line 64 of file keccak.c.

void const* sha3_Finalize ( void *  priv)

Definition at line 232 of file keccak.c.

sha3_return_t sha3_HashBuffer ( unsigned  bitSize,
enum SHA3_FLAGS  flags,
const void *  in,
unsigned  inBytes,
void *  out,
unsigned  outBytes 
)

Definition at line 286 of file keccak.c.

sha3_return_t sha3_Init ( void *  priv,
unsigned  bitSize 
)

Definition at line 114 of file keccak.c.

void sha3_Init256 ( void *  priv)

Definition at line 123 of file keccak.c.

void sha3_Init384 ( void *  priv)

Definition at line 127 of file keccak.c.

void sha3_Init512 ( void *  priv)

Definition at line 131 of file keccak.c.

enum SHA3_FLAGS sha3_SetFlags ( void *  priv,
enum  SHA3_FLAGS 
)

Definition at line 135 of file keccak.c.

void sha3_Update ( void *  priv,
void const *  bufIn,
size_t  len 
)

Definition at line 142 of file keccak.c.