Kagome
Polkadot Runtime Engine in C++17
mp_utils.cpp File Reference
#include "common/mp_utils.hpp"
#include <gsl/gsl_util>
#include "macro/endianness_utils.hpp"
Include dependency graph for mp_utils.cpp:

Go to the source code of this file.

Namespaces

 kagome::common
 

Functions

std::array< uint8_t, 8 > kagome::common::uint64_to_le_bytes (uint64_t number)
 
uint64_t kagome::common::le_bytes_to_uint64 (gsl::span< const uint8_t, 8 > bytes)
 
std::array< uint8_t, 8 > kagome::common::uint64_to_be_bytes (uint64_t number)
 
uint64_t kagome::common::be_bytes_to_uint64 (gsl::span< const uint8_t, 8 > bytes)
 
std::array< uint8_t, 16 > kagome::common::uint128_to_le_bytes (const boost::multiprecision::uint128_t &i)
 
boost::multiprecision::uint128_t kagome::common::le_bytes_to_uint128 (gsl::span< const uint8_t, 16 > bytes)
 
std::array< uint8_t, 16 > kagome::common::uint128_to_be_bytes (const boost::multiprecision::uint128_t &i)
 
boost::multiprecision::uint128_t kagome::common::be_bytes_to_uint128 (gsl::span< const uint8_t, 16 > bytes)
 
std::array< uint8_t, 32 > kagome::common::uint256_to_le_bytes (const boost::multiprecision::uint256_t &i)
 
boost::multiprecision::uint256_t kagome::common::le_bytes_to_uint256 (gsl::span< const uint8_t, 32 > bytes)
 
std::array< uint8_t, 32 > kagome::common::uint256_to_be_bytes (const boost::multiprecision::uint256_t &i)
 
boost::multiprecision::uint256_t kagome::common::be_bytes_to_uint256 (gsl::span< const uint8_t, 32 > bytes)