Maze Builder Docs 8.2.1
Loading...
Searching...
No Matches
mazes::bytes Class Reference

Base64 encoding and decoding helper class. More...

#include <bytes.h>

Static Public Member Functions

static std::string encode (std::string_view sv) noexcept
 Transform an input string into base64 characters.
 
static std::string decode (std::string_view sv) noexcept
 Transform an input string from from base64 characters.
 
static std::string_view bytes_to_string (const std::vector< std::uint8_t > &bytes) noexcept
 Transform a vector of bytes into a string_view.
 
static std::vector< std::uint8_t > string_to_bytes (std::string_view sv) noexcept
 Transform a string_view into a vector of bytes.
 
static std::string to_base36 (std::uint32_t value) noexcept
 Convert an 32-bit integer value to a base36 string.
 

Detailed Description

Base64 encoding and decoding helper class.

This class provides methods to encode and decode strings using the Base64 encoding scheme

Member Function Documentation

◆ bytes_to_string()

static std::string_view mazes::bytes::bytes_to_string ( const std::vector< std::uint8_t > & bytes)
staticnoexcept

Transform a vector of bytes into a string_view.

Parameters
bytesThe vector of bytes to transform
Returns
A string_view representing the bytes

◆ decode()

static std::string mazes::bytes::decode ( std::string_view sv)
staticnoexcept

Transform an input string from from base64 characters.

Parameters
svThe base64 encoded string to decode
Returns
A string representing the decoded input

◆ encode()

static std::string mazes::bytes::encode ( std::string_view sv)
staticnoexcept

Transform an input string into base64 characters.

Parameters
svThe input string to encode
Returns
A string representing the base64 encoded input

◆ string_to_bytes()

static std::vector< std::uint8_t > mazes::bytes::string_to_bytes ( std::string_view sv)
staticnoexcept

Transform a string_view into a vector of bytes.

Parameters
svThe string_view to transform
Returns
A vector of bytes representing the string_view

◆ to_base36()

static std::string mazes::bytes::to_base36 ( std::uint32_t value)
staticnoexcept

Convert an 32-bit integer value to a base36 string.

Parameters
valueThe 32-bit integer value to convert
Returns
A string representing the value in base36

The documentation for this class was generated from the following file: