libbasen v1.1.0
encoding/decoding from arbitrary base
Loading...
Searching...
No Matches
baseN.hpp File Reference
#include <cstdint>
#include <span>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  baseN
 

Functions

void baseN::digitsMap (const char *digits, uint8_t digits_size, uint8_t *map)
 
bool baseN::isValid (const char *str, size_t str_size, const uint8_t *map) noexcept
 
bool baseN::isValid (std::string_view str, const uint8_t *map) noexcept
 
size_t baseN::sizeEncoded (std::span< const uint8_t > data, uint8_t base)
 
size_t baseN::sizeDecoded (std::string_view str, uint8_t base, const char *digits)
 
size_t baseN::encode (const uint8_t *data, size_t data_size, char *str, size_t str_size, uint8_t base, const char *digits)
 
std::string baseN::encode (std::span< const uint8_t > data, uint8_t base, const char *digits)
 
size_t baseN::decode (const char *str, size_t str_size, uint8_t *data, size_t data_size, uint8_t base, const char *digits, const uint8_t *map)
 
std::vector< uint8_t > baseN::decode (std::string_view str, uint8_t base, const char *digits, const uint8_t *map)