Commit 8e5900a2 authored by ale's avatar ale

remove unused base64 methods from mod_sso/sso_utils

parent b5ec86fe
......@@ -50,7 +50,6 @@ typedef map<string, string> params_t;
void debug(const string& s);
string url_decode(const string& str);
string url_encode(const string& str);
string base64_decode(const string& str);
params_t parse_query_string(const string& str);
void make_cookie_value(string& cookie_value, const string& name,
const string& session_id, const string& path,
......
......@@ -32,7 +32,6 @@
#include "http_protocol.h"
#include "http_main.h"
#include "ap_config.h"
#include "apr_base64.h"
#include "mod_sso.h"
namespace modsso {
......@@ -114,13 +113,6 @@ string url_encode(const string& str) {
return out;
}
string base64_decode(const string& str) {
char buf[apr_base64_decode_len(str.c_str()) + 1];
int n = apr_base64_decode(buf, str.c_str());
string out(buf, n);
return out;
}
params_t parse_query_string(const string& str) {
params_t p;
if(str.size() == 0) return p;
......
......@@ -38,13 +38,6 @@ TEST_F(SSOUtilsTest, UrlEncode) {
EXPECT_EQ(reference, result);
}
TEST_F(SSOUtilsTest, Base64Decode) {
string reference("just|an|example"),
sample("anVzdHxhbnxleGFtcGxl");
string result = modsso::base64_decode(sample);
ASSERT_EQ(reference, result);
}
TEST_F(SSOUtilsTest, ParseQueryString) {
modsso::params_t parms;
parms = modsso::parse_query_string("key1=val1&key%32=%76%61%6C2");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment