22 const std::string random_encoded_string(buffer.begin(), buffer.end());
24 std::vector<unsigned char> decoded;
26 const std::string encoded_string =
EncodeBase58(decoded);
39 const std::string encoded_string =
EncodeBase32(*result);
46 const std::string encoded_string =
EncodeBase64(*result);
std::string EncodeBase58(Span< const unsigned char > input)
Why base-58 instead of standard base-64 encoding?
std::string EncodeBase58Check(Span< const unsigned char > input)
Encode a byte span into a base58-encoded string, including checksum.
static bool DecodeBase58Check(const char *psz, std::vector< unsigned char > &vchRet, int max_ret_len)
static bool DecodeBase58(const char *psz, std::vector< unsigned char > &vch, int max_ret_len)
FUZZ_TARGET(base_encode_decode)
std::string_view TrimStringView(std::string_view str, std::string_view pattern=" \f\n\r\t\v")
std::string TrimString(std::string_view str, std::string_view pattern=" \f\n\r\t\v")
bool DecodeBase64PSBT(PartiallySignedTransaction &psbt, const std::string &base64_tx, std::string &error)
Decode a base64ed PSBT into a PartiallySignedTransaction.
A version of CTransaction with the PSBT format.
std::string EncodeBase64(Span< const unsigned char > input)
std::optional< std::vector< unsigned char > > DecodeBase32(std::string_view str)
std::string EncodeBase32(Span< const unsigned char > input, bool pad)
Base32 encode.
std::optional< std::vector< unsigned char > > DecodeBase64(std::string_view str)
std::string ToLower(std::string_view str)
Returns the lowercase equivalent of the given string.