shill: Remove uses of Base64Encode/Decode

Change to B64Encode/Decode to avoid memory leaks.

TEST=Unit tests pass
BUG=chromium:222827

Change-Id: I160fd8eae6d0d6d6307b1ab37b5d1029c3990abf
Reviewed-on: https://gerrit.chromium.org/gerrit/46172
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
diff --git a/glib.cc b/glib.cc
index d5c0f91..f80a9d2 100644
--- a/glib.cc
+++ b/glib.cc
@@ -14,6 +14,7 @@
 
 namespace shill {
 
+GLib::GLib() {}
 GLib::~GLib() {}
 
 std::string GLib::ConvertErrorToMessage(GError *error) {
@@ -26,18 +27,10 @@
   return message;
 }
 
-guchar *GLib::Base64Decode(const gchar *text, gsize *out_len) {
-  return g_base64_decode(text, out_len);
-}
-
-gchar *GLib::Base64Encode(const guchar *data, gsize len) {
-  return g_base64_encode(data, len);
-}
-
 bool GLib::B64Decode(const string &input, string *output) {
   CHECK(output);
   gsize result_len = 0;
-  guchar *result = Base64Decode(input.c_str(), &result_len);
+  guchar *result = g_base64_decode(input.c_str(), &result_len);
   if (!result) {
     LOG(ERROR) << "Failed in encoding.";
     return false;
@@ -56,7 +49,7 @@
 
 bool GLib::B64Encode(const string &input, string *output) {
   CHECK(output);
-  gchar *result = Base64Encode(
+  gchar *result = g_base64_encode(
       reinterpret_cast<const unsigned char *>(input.c_str()), input.length());
   if (!result) {
     LOG(ERROR) << "Failed in encoding.";