6#ifndef OPENCBDC_TX_SRC_COMMON_HASH_H_
7#define OPENCBDC_TX_SRC_COMMON_HASH_H_
9#include "crypto/siphash.h"
16 static constexpr const int hash_size = 32;
19 using hash_t = std::array<unsigned char, cbdc::hash_size>;
std::array< unsigned char, cbdc::hash_size > hash_t
SHA256 hash container.
auto hash_data(const std::byte *data, size_t len) -> hash_t
Calculates the SHA256 hash of the specified data.
auto hash_from_hex(const std::string &val) -> hash_t
Parses a hexadecimal representation of a hash.
auto to_string(const hash_t &val) -> std::string
Converts a hash to a hexadecimal string.