Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
 
Loading...
Searching...
No Matches
keccak256.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <cassert>
6
7namespace dcn
8{
9 class Keccak256
10 {
11 public:
12 static constexpr int HASH_LEN = 32;
13
14 static void getHash(const std::uint8_t msg[], std::size_t len, std::uint8_t hashResult[HASH_LEN]);
15
16 private:
17 Keccak256() = delete;
18
19 static void absorb(std::uint64_t state[5][5]);
20 static std::uint64_t rotl64(std::uint64_t x, int i);
21
22 static const unsigned char ROTATION[5][5];
23 static constexpr int BLOCK_SIZE = 200 - HASH_LEN * 2;
24 static constexpr int NUM_ROUNDS = 24;
25 };
26}
Definition keccak256.hpp:10
static constexpr int HASH_LEN
Definition keccak256.hpp:12
static void getHash(const std::uint8_t msg[], std::size_t len, std::uint8_t hashResult[HASH_LEN])
Definition keccak256.cpp:6
Definition decentralised_art.hpp:30