Kagome
Polkadot Runtime Engine in C++17
hexutil.cpp File Reference
#include "common/hexutil.hpp"
#include <boost/algorithm/hex.hpp>
#include <gsl/span>
Include dependency graph for hexutil.cpp:

Go to the source code of this file.

Namespaces

 kagome::common
 

Functions

 OUTCOME_CPP_DEFINE_CATEGORY (kagome::common, UnhexError, e)
 
std::string kagome::common::int_to_hex (uint64_t n, size_t fixed_width=2) noexcept
 Converts an integer to an uppercase hex representation. More...
 
std::string kagome::common::hex_upper (gsl::span< const uint8_t > bytes) noexcept
 Converts bytes to uppercase hex representation. More...
 
std::string kagome::common::hex_lower (gsl::span< const uint8_t > bytes) noexcept
 Converts bytes to hex representation. More...
 
std::string kagome::common::hex_lower_0x (gsl::span< const uint8_t > bytes) noexcept
 Converts bytes to hex representation with prefix 0x. More...
 
outcome::result< std::vector< uint8_t > > kagome::common::unhex (std::string_view hex)
 Converts hex representation to bytes. More...
 
outcome::result< std::vector< uint8_t > > kagome::common::unhexWith0x (std::string_view hex)
 Unhex hex-string with 0x in the begining. More...
 

Function Documentation

OUTCOME_CPP_DEFINE_CATEGORY ( kagome::common  ,
UnhexError  ,
 
)

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Definition at line 11 of file hexutil.cpp.