implemented advanced search history feature
This commit is contained in:
@@ -91,7 +91,7 @@ bool base64_decode(const string& in, string& out)
|
||||
{
|
||||
int io = 0, state = 0, ch = 0;
|
||||
unsigned int ii = 0;
|
||||
out.erase();
|
||||
out.clear();
|
||||
size_t ilen = in.length();
|
||||
out.reserve(ilen);
|
||||
|
||||
@@ -217,7 +217,7 @@ void base64_encode(const string &in, string &out)
|
||||
unsigned char input[3];
|
||||
unsigned char output[4];
|
||||
|
||||
out.erase();
|
||||
out.clear();
|
||||
|
||||
int srclength = in.length();
|
||||
int sidx = 0;
|
||||
|
||||
@@ -20,5 +20,18 @@
|
||||
|
||||
void base64_encode(const std::string& in, std::string& out);
|
||||
bool base64_decode(const std::string& in, std::string& out);
|
||||
inline std::string base64_encode(const std::string& in)
|
||||
{
|
||||
std::string o;
|
||||
base64_encode(in, o);
|
||||
return o;
|
||||
}
|
||||
inline std::string base64_decode(const std::string& in)
|
||||
{
|
||||
std::string o;
|
||||
if (base64_decode(in, o))
|
||||
return o;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
#endif /* _BASE64_H_INCLUDED_ */
|
||||
|
||||
Reference in New Issue
Block a user