Files
nearby/cpp/platform/base64_utils.h
T
Alexey Polyudov 81a6d31778 Merge branch 'google3'
Change-Id: I8511d14d8173f661fc79cf0ad6ed3e8700efdbd4
2020-04-04 12:56:13 -07:00

27 lines
665 B
C++

#ifndef PLATFORM_BASE64_UTILS_H_
#define PLATFORM_BASE64_UTILS_H_
#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(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 Ptr<ByteArray> decode(const std::string& base64_string);
};
} // namespace nearby
} // namespace location
#endif // PLATFORM_BASE64_UTILS_H_