aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2011-09-20 15:38:29 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2011-09-27 19:47:35 +0200
commit4b603f1cd6a0b8480c15555389077a4b401c2c7b (patch)
tree3ac0b307439f1fbac5b5f53eebad4603dbdba0e2 /src/util.h
parent4e67a6216bf3633320950117aba3566cbfd5ffda (diff)
Inline base64 encoder/decoder
This replaces the openssl-based base64 encoder and decoder with a more efficient internal one. Tested against the rfc4648 test vectors. Decoder is based on JoelKatz' version.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 92a2b839ca..1fdfdf1197 100644
--- a/src/util.h
+++ b/src/util.h
@@ -178,6 +178,10 @@ bool ParseMoney(const std::string& str, int64& nRet);
bool ParseMoney(const char* pszIn, int64& nRet);
std::vector<unsigned char> ParseHex(const char* psz);
std::vector<unsigned char> ParseHex(const std::string& str);
+std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid = NULL);
+std::string DecodeBase64(const std::string& str);
+std::string EncodeBase64(const unsigned char* pch, size_t len);
+std::string EncodeBase64(const std::string& str);
void ParseParameters(int argc, char* argv[]);
const char* wxGetTranslation(const char* psz);
bool WildcardMatch(const char* psz, const char* mask);
@@ -201,7 +205,6 @@ void SetMockTime(int64 nMockTimeIn);
int64 GetAdjustedTime();
void AddTimeData(unsigned int ip, int64 nTime);
std::string FormatFullVersion();
-std::string DecodeBase64(const std::string &s);