Bitcoin
Functions
bech32 Namespace Reference

Functions

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

Function Documentation

◆ Decode()

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

Decode a Bech32 string.

Decode a Bech32 string. Returns (hrp, data). Empty hrp means failure.

◆ Encode() [1/2]

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

Encode a Bech32 string. Returns the empty string in case of failure.

◆ Encode() [2/2]

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

Encode a Bech32 string.