Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Functions
base58.h File Reference
#include <span.h>
#include <string>
#include <vector>
Include dependency graph for base58.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string EncodeBase58 (Span< const uint8_t > input)
 Why base-58 instead of standard base-64 encoding?
 
bool DecodeBase58 (const std::string &str, std::vector< uint8_t > &vchRet, int max_ret_len)
 Decode a base58-encoded string (str) into a byte vector (vchRet).
 
std::string EncodeBase58Check (Span< const uint8_t > input)
 Encode a byte span into a base58-encoded string, including checksum.
 
bool DecodeBase58Check (const std::string &str, std::vector< uint8_t > &vchRet, int max_ret_len)
 Decode a base58-encoded string (str) that includes a checksum into a byte vector (vchRet), return true if decoding is successful.
 

Function Documentation

◆ DecodeBase58()

bool DecodeBase58 ( const std::string &  str,
std::vector< uint8_t > &  vchRet,
int  max_ret_len 
)

Decode a base58-encoded string (str) into a byte vector (vchRet).

return true if decoding is successful.

Definition at line 144 of file base58.cpp.

Here is the call graph for this function:

◆ DecodeBase58Check()

bool DecodeBase58Check ( const std::string &  str,
std::vector< uint8_t > &  vchRet,
int  max_ret_len 
)

Decode a base58-encoded string (str) that includes a checksum into a byte vector (vchRet), return true if decoding is successful.

Definition at line 181 of file base58.cpp.

Here is the call graph for this function:

◆ EncodeBase58()

std::string EncodeBase58 ( Span< const uint8_t input)

Why base-58 instead of standard base-64 encoding?

  • Don't want 0OIl characters that look the same in some fonts and could be used to create visually identical looking data.
  • A string with non-alphanumeric characters is not as easily accepted as input.
  • E-mail usually won't line-break if there's no punctuation to break at.
  • Double-clicking selects the whole string as one word if it's all alphanumeric. Encode a byte span as a base58-encoded string

Definition at line 101 of file base58.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EncodeBase58Check()

std::string EncodeBase58Check ( Span< const uint8_t input)

Encode a byte span into a base58-encoded string, including checksum.

Definition at line 152 of file base58.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: