cryptnox-sdk-arduino 1.0.0
Arduino library for Cryptnox Hardware Wallet
Loading...
Searching...
No Matches
keccak256.h File Reference

Keccak-256 (SHA3 variant) hash function for Ethereum. More...

#include <stdint.h>
#include <stddef.h>
Include dependency graph for keccak256.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void keccak256 (const uint8_t *in, size_t inlen, uint8_t out[32])
 Compute the Keccak-256 hash of a given input buffer.

Detailed Description

Keccak-256 (SHA3 variant) hash function for Ethereum.

Provides a function to compute the Keccak-256 hash of an input buffer, producing a 32-byte digest.

Note
This implementation is suitable for Ethereum-style hashing.

Definition in file keccak256.h.

Function Documentation

◆ keccak256()

void keccak256 ( const uint8_t * in,
size_t inlen,
uint8_t out[32] )

Compute the Keccak-256 hash of a given input buffer.

Parameters
[in]inPointer to input data.
[in]inlenLength of input data in bytes.
[out]outPointer to a 32-byte buffer where the hash will be stored.
Note
The output buffer must be at least 32 bytes long.
This function implements the Ethereum variant of Keccak-256.

Compute the Keccak-256 hash of a given input buffer.

Parameters
[in]inPointer to input buffer.
[in]inlenLength of input buffer in bytes.
[out]outPointer to a 32-byte buffer to store the hash.
Note
The output buffer must be at least 32 bytes long.
This is Ethereum's Keccak-256 (pre-SHA3 standard padding).

Definition at line 111 of file keccak256.cpp.

References keccakf().

Referenced by setup().