mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
nearby: snapshot of cl/304428753
Signed-off-by: Alexey Polyudov <apolyudov@google.com> Change-Id: I0023ac6e40456fc4a8169c3173bcbff3b5ccc476
This commit is contained in:
@@ -4,23 +4,24 @@
|
||||
#include "platform/byte_array.h"
|
||||
#include "platform/port/string.h"
|
||||
#include "platform/ptr.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
|
||||
class Base64Utils {
|
||||
public:
|
||||
static std::string encode(const std::string& input);
|
||||
static std::string encode(absl::string_view input);
|
||||
static std::string encode(const ByteArray& bytes);
|
||||
static std::string encode(ConstPtr<ByteArray> bytes);
|
||||
|
||||
template <typename T>
|
||||
static T decode(const std::string& base64_string);
|
||||
static T decode(absl::string_view base64_string);
|
||||
template <>
|
||||
Ptr<ByteArray> decode(const std::string& base64_string);
|
||||
Ptr<ByteArray> decode(absl::string_view base64_string);
|
||||
template <>
|
||||
ByteArray decode(const std::string& base64_string);
|
||||
static Ptr<ByteArray> decode(const std::string& base64_string) {
|
||||
ByteArray decode(absl::string_view base64_string);
|
||||
static Ptr<ByteArray> decode(absl::string_view base64_string) {
|
||||
return decode<Ptr<ByteArray>>(base64_string);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user