Bitcoin Core  0.21.0rc3
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
Functions
bech32 Namespace Reference

Functions

std::string Encode (const std::string &hrp, const data &values)
 Encode a Bech32 string. More...
 
std::pair< std::string, data > Decode (const std::string &str)
 Decode a Bech32 string. More...
 
std::string Encode (const std::string &hrp, const std::vector< uint8_t > &values)
 Encode a Bech32 string. More...
 

Function Documentation

std::pair< std::string, std::vector< uint8_t > > bech32::Decode ( const std::string &  str)

Decode a Bech32 string.

Returns (hrp, data). Empty hrp means failure.

Definition at line 159 of file bech32.cpp.

Here is the caller graph for this function:

std::string bech32::Encode ( const std::string &  hrp,
const std::vector< uint8_t > &  values 
)

Encode a Bech32 string.

If hrp contains uppercase characters, this will cause an assertion error.

std::string bech32::Encode ( const std::string &  hrp,
const data &  values 
)

Encode a Bech32 string.

Definition at line 143 of file bech32.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: