Qtbech32 0.1.1
Bech32 library
Classes | Enumerations | Functions
bech32 Namespace Reference

Classes

struct  DecodeResult
 

Enumerations

enum class  Encoding { INVALID , BECH32 , BECH32M }
 

Functions

std::string encode (const std::string &hrp, const data &values, Encoding encoding)
 
DecodeResult decode (const std::string &str)
 
std::string encode (const std::string &hrp, const std::vector< uint8_t > &values, Encoding encoding)
 

Enumeration Type Documentation

◆ Encoding

enum bech32::Encoding
strong
Enumerator
INVALID 
BECH32 
BECH32M 

Bech32 encoding as defined in BIP173.

Function Documentation

◆ decode()

DecodeResult bech32::decode ( const std::string str)

Decode a Bech32 or Bech32m string.

◆ encode() [1/2]

std::string bech32::encode ( const std::string hrp,
const data &  values,
Encoding  encoding 
)

Encode a Bech32 or Bech32m string.

◆ encode() [2/2]

std::string bech32::encode ( const std::string hrp,
const std::vector< uint8_t > &  values,
Encoding  encoding 
)

Encode a Bech32 or Bech32m string. If hrp contains uppercase characters, this will cause an assertion error. Encoding must be one of BECH32 or BECH32M.