include/Base64.h

include/Base64.h

Functions

Name
std::stringencodeBase64(const uint8_t * data, size_t size)
Base64 encode some data.
std::stringencodeBase64(const std::vector< uint8_t > & data)
Base64 encode some data.
std::vector< uint8_t >decodeBase64(const std::string & data)
Decode some Base64 encoded data.

Functions Documentation

function encodeBase64

std::string encodeBase64(
    const uint8_t * data,
    size_t size
)

Base64 encode some data.

Parameters:

  • data Pointer to the data to encode with Base64
  • size The length of the data to encode with Base64

Return: The resulting Base64 encoded string

function encodeBase64

std::string encodeBase64(
    const std::vector< uint8_t > & data
)

Base64 encode some data.

Parameters:

  • data The data to encode with Base64

Return: The resulting Base64 encoded string

function decodeBase64

std::vector< uint8_t > decodeBase64(
    const std::string & data
)

Decode some Base64 encoded data.

Parameters:

  • data The Base64 encoded string to decode

Return: The resulting decoded data

Source code

// Copyright (c) 2022, Edgeware AB. All rights reserved.

#pragma once

#include <string>
#include <vector>

std::string encodeBase64(const uint8_t* data, size_t size);

std::string encodeBase64(const std::vector<uint8_t>& data);

std::vector<uint8_t> decodeBase64(const std::string& data);

Updated on 2023-10-03 at 14:32:11 +0200