Bitcoin ABC
0.32.12
P2P Digital Currency
src
crypto
hex_base.h
Go to the documentation of this file.
1
// Copyright (c) 2009-present The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_CRYPTO_HEX_BASE_H
6
#define BITCOIN_CRYPTO_HEX_BASE_H
7
8
#include <
span.h
>
9
10
#include <cstddef>
11
#include <cstdint>
12
#include <string>
13
17
std::string
HexStr
(
const
Span<const uint8_t>
s);
18
inline
std::string
HexStr
(
const
Span<const char>
s) {
19
return
HexStr
(
MakeUCharSpan
(s));
20
}
21
inline
std::string
HexStr
(
const
Span<const std::byte>
s) {
22
return
HexStr
(
MakeUCharSpan
(s));
23
}
24
25
signed
char
HexDigit
(
char
c);
26
27
#endif
// BITCOIN_CRYPTO_HEX_BASE_H
Span< const uint8_t >
HexStr
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
Definition:
hex_base.cpp:30
HexDigit
signed char HexDigit(char c)
Definition:
hex_base.cpp:64
span.h
MakeUCharSpan
constexpr auto MakeUCharSpan(V &&v) -> decltype(UCharSpanCast(Span{std::forward< V >(v)}))
Like the Span constructor, but for (const) uint8_t member types only.
Definition:
span.h:350
Generated on Wed Apr 1 2026 06:09:01 for Bitcoin ABC by
1.9.4