mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 07:06:11 -04:00
Change-Id: Ied63786e8f73cec805123031c26886295f086691 Signed-off-by: Alexey Polyudov <apolyudov@google.com>
27 lines
663 B
C++
27 lines
663 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(absl::string_view base64_string);
|
|
static Ptr<ByteArray> decode(absl::string_view base64_string);
|
|
};
|
|
|
|
} // namespace nearby
|
|
} // namespace location
|
|
|
|
#endif // PLATFORM_BASE64_UTILS_H_
|