TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
Loading...
Searching...
No Matches
tec_base64.hpp File Reference

A header-only Base64 encoder/decoder. More...

#include <string>
#include <string_view>
#include <vector>
#include <array>
#include <cstdint>

Go to the source code of this file.

Functions

bool tec::base64::is_valid (std::string_view data)
 
std::string tec::base64::encode (std::string_view data)
 
std::vector< uint8_ttec::base64::decode (std::string_view data)
 

Variables

constexpr std::string_view tec::base64::chars
 

Detailed Description

A header-only Base64 encoder/decoder.

Author
The Emacs Cat
Date
2026-01-04

Function Documentation

◆ decode()

std::vector< uint8_t > tec::base64::decode ( std::string_view  data)
inline

Decodes a Base64 string into a vector of bytes.

◆ encode()

std::string tec::base64::encode ( std::string_view  data)
inline

Encodes raw binary data into a Base64 string.

◆ is_valid()

bool tec::base64::is_valid ( std::string_view  data)
inline

Validates whether a string is a properly formatted Base64 string.

Variable Documentation

◆ chars

constexpr std::string_view tec::base64::chars
inlineconstexpr
Initial value:
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"