include/Base64.h
include/Base64.h
Functions
Name | |
---|---|
std::string | encodeBase64(const uint8_t * data, size_t size) Base64 encode some data. |
std::string | encodeBase64(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 2022-11-17 at 15:40:06 +0100