platform2: Switch over to using base64 functions from libchromeos

Replaced existing implementations of Base64Encode/Base64Decode
with the functions from libchromeos, which were added as part
of an earlier change (see CL:247690).

BUG=None
TEST=`FEATURES=test emerge-link cryptohome debugd metrics privetd update_engine`

Change-Id: I8cec677ce2c2fd3b97ca2228d35c2cf5cd133f4c
Reviewed-on: https://chromium-review.googlesource.com/247792
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/payload_generator/payload_signer.cc b/payload_generator/payload_signer.cc
index a33c24f..f3cc4de 100644
--- a/payload_generator/payload_signer.cc
+++ b/payload_generator/payload_signer.cc
@@ -7,6 +7,7 @@
 #include <base/logging.h>
 #include <base/strings/string_split.h>
 #include <base/strings/string_util.h>
+#include <chromeos/data_encoding.h>
 #include <openssl/pem.h>
 
 #include "update_engine/omaha_hash_calculator.h"
@@ -317,9 +318,8 @@
                                  private_key_path,
                                  &signature));
 
-  TEST_AND_RETURN_FALSE(OmahaHashCalculator::Base64Encode(&signature[0],
-                                                          signature.size(),
-                                                          out_signature));
+  *out_signature = chromeos::data_encoding::Base64Encode(signature.data(),
+                                                         signature.size());
   return true;
 }