mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Cleanups.
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/iostreams/concepts.hpp>
|
||||
#include <boost/iostreams/stream.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
@@ -28,7 +30,7 @@ inline bool isSwitchChar(char c)
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string EncodeBase64(std::string s)
|
||||
std::string EncodeBase64(const std::string& s)
|
||||
{ // FIXME: This performs terribly
|
||||
BIO *b64, *bmem;
|
||||
BUF_MEM *bptr;
|
||||
@@ -38,7 +40,7 @@ std::string EncodeBase64(std::string s)
|
||||
bmem = BIO_new(BIO_s_mem());
|
||||
b64 = BIO_push(b64, bmem);
|
||||
BIO_write(b64, s.c_str(), s.size());
|
||||
BIO_flush(b64);
|
||||
(void) BIO_flush(b64);
|
||||
BIO_get_mem_ptr(b64, &bptr);
|
||||
|
||||
std::string result(bptr->data, bptr->length);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "json/value.h"
|
||||
|
||||
extern int commandLineRPC(int argc, char *argv[]);
|
||||
extern Json::Value callRPC(const std::string& strMethod, const Json::Value& params);
|
||||
extern Json::Value callRPC(const std::string& strMethod, const Json::Value& params);
|
||||
|
||||
Reference in New Issue
Block a user