Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
|
Go to the documentation of this file.
5 #ifndef __ZETH_CORE_UTILS_HPP__
6 #define __ZETH_CORE_UTILS_HPP__
58 const void *
bytes,
size_t num_bytes,
bool prefix =
false);
63 const void *
bytes,
size_t num_bytes,
bool prefix =
false);
71 template<
typename StructuredT>
76 template<
typename StructuredTs>
83 #endif // __ZETH_CORE_UTILS_HPP__
void hex_to_bytes(const std::string &hex, void *dest, size_t bytes)
Convert hex to bytes (first chars at lowest address)
static constexpr size_t bit_size()
static constexpr size_t hamming_weight()
bool container_is_well_formed(const StructuredTs &values)
void check_well_formed(const StructuredT &v, const char *name)
T swap_byte_endianness(T v)
std::string bytes_to_hex_reversed(const void *bytes, size_t num_bytes, bool prefix)
void hex_to_bytes_reversed(const std::string &hex, void *dest, size_t bytes)
uint8_t char_to_nibble(const char c)
std::string bytes_to_hex(const void *bytes, size_t num_bytes, bool prefix)
Compile-time computations related to bit representations of size_t values.