Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
base64.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <expected>
5#include <span>
6#include <string>
7#include <string_view>
8#include <vector>
9
10namespace mm::core {
11
19
26std::string base64Encode(std::span<const uint8_t> bytes);
27
36std::expected<std::vector<uint8_t>, std::string> base64Decode(std::string_view text);
37
38} // namespace mm::core
Definition http_server.h:25
std::expected< std::vector< uint8_t >, std::string > base64Decode(std::string_view text)
Decodes base64 text.
Definition base64.cc:57
std::string base64Encode(std::span< const uint8_t > bytes)
Encodes bytes as base64 with padding, on one line.
Definition base64.cc:26