Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
blake2s.hpp File Reference
#include <array>
#include <cstddef>
#include <cstdint>
#include <vector>

Go to the source code of this file.

Classes

struct  bb::crypto::blake2s_state__
 

Namespaces

namespace  bb
 Entry point for Barretenberg command-line interface.
 
namespace  bb::crypto
 

Macros

#define BLAKE2_PACKED(x)   x __attribute__((packed))
 

Typedefs

typedef struct bb::crypto::blake2s_state__ bb::crypto::blake2s_state
 
typedef struct blake2s_param__ bb::crypto::blake2s_param
 

Enumerations

enum  bb::crypto::blake2s_constant {
  bb::crypto::BLAKE2S_BLOCKBYTES = 64 , bb::crypto::BLAKE2S_OUTBYTES = 32 , bb::crypto::BLAKE2S_KEYBYTES = 32 , bb::crypto::BLAKE2S_SALTBYTES = 8 ,
  bb::crypto::BLAKE2S_PERSONALBYTES = 8
}
 
enum  { bb::crypto::BLAKE2_DUMMY_1 = 1 / (sizeof(blake2s_param) == BLAKE2S_OUTBYTES) }
 

Functions

 bb::crypto::BLAKE2_PACKED (struct blake2s_param__ { uint8_t digest_length;uint8_t key_length;uint8_t fanout;uint8_t depth;uint32_t leaf_length;uint32_t node_offset;uint16_t xof_length;uint8_t node_depth;uint8_t inner_length;uint8_t salt[BLAKE2S_SALTBYTES];uint8_t personal[BLAKE2S_PERSONALBYTES];})
 
int bb::crypto::blake2s_init (blake2s_state *S, size_t outlen)
 
int bb::crypto::blake2s_init_key (blake2s_state *S, size_t outlen, const void *key, size_t keylen)
 
int bb::crypto::blake2s_init_param (blake2s_state *S, const blake2s_param *P)
 
int bb::crypto::blake2s_update (blake2s_state *S, const void *pin, size_t inlen)
 
int bb::crypto::blake2s_final (blake2s_state *S, void *out, size_t outlen)
 
std::array< uint8_t, BLAKE2S_OUTBYTESbb::crypto::blake2s (std::vector< uint8_t > const &input)
 

Macro Definition Documentation

◆ BLAKE2_PACKED

#define BLAKE2_PACKED (   x)    x __attribute__((packed))

Definition at line 33 of file blake2s.hpp.