aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorJoelKatz <DavidJoelSchwartz@GMail.com>2011-07-25 15:13:55 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2011-09-27 19:47:34 +0200
commit4e67a6216bf3633320950117aba3566cbfd5ffda (patch)
treee5739dd58720f6d65979f158bf51eb006ce77000 /src/bitcoinrpc.cpp
parent9a1ce869690fe87fbce169a4b685695dc9e575f6 (diff)
Faster Base64 decoder.
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 5a1fab6943..db2e610fad 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -1830,24 +1830,6 @@ string EncodeBase64(string s)
return result;
}
-string DecodeBase64(string s)
-{
- BIO *b64, *bmem;
-
- char* buffer = static_cast<char*>(calloc(s.size(), sizeof(char)));
-
- b64 = BIO_new(BIO_f_base64());
- BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
- bmem = BIO_new_mem_buf(const_cast<char*>(s.c_str()), s.size());
- bmem = BIO_push(b64, bmem);
- BIO_read(bmem, buffer, s.size());
- BIO_free_all(bmem);
-
- string result(buffer);
- free(buffer);
- return result;
-}
-
bool HTTPAuthorized(map<string, string>& mapHeaders)
{
string strAuth = mapHeaders["authorization"];