StormByte C++ Library 1.2.0
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
base64.hxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte.
5 *
6 * StormByte is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License version 3
8 * or later, as published by the Free Software Foundation.
9 *
10 * StormByte is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with StormByte. If not, see
17 * <https://www.gnu.org/licenses/lgpl-3.0.html>.
18 */
19
20#pragma once
21
23
24#include <cstddef>
25#include <span>
26#include <string>
27#include <string_view>
28#include <vector>
29
34namespace StormByte {
47 std::vector<std::byte> STORMBYTE_PUBLIC Base64Decode(std::string_view input);
48
53 std::string STORMBYTE_PUBLIC Base64Encode(const std::vector<std::byte>& input);
54
59 std::string STORMBYTE_PUBLIC Base64Encode(std::span<const std::byte> input);
60}
Root namespace of the StormByte suite.
std::string Base64Encode(const std::vector< std::byte > &input)
Encodes bytes as Base64 with = padding.
std::vector< std::byte > Base64Decode(std::string_view input)
Decodes Base64 text into bytes.
#define STORMBYTE_PUBLIC
Definition visibility.h:28