NDEVR
API Documentation
Base64Encoder.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Buffer.h>
4#include <NDEVR/BaseValues.h>
5namespace NDEVR
6{
7 class File;
8 class String;
9 class StringView;
14 class NDEVR_BASE_API Base64Encoder
15 {
16 public:
29 static String EncodeToBase64(const uint01* buf, uint04 size);
36 static void AppendBase64To(String& s, const uint01* buf, uint04 size);
42 static uint04 pos_of_char(const uint01 chr);
49 };
50}
Functions for converting to and from Base64 https://en.wikipedia.org/wiki/Base64.
static uint04 pos_of_char(const uint01 chr)
Looks up the position index of a character within the Base64 alphabet.
static String EncodeToBase64(File file)
Encodes the contents of a file into a Base64-encoded string.
static String EncodeToBase64(const uint01 *buf, uint04 size)
Encodes a raw byte buffer into a Base64-encoded string.
static void AppendBase64To(String &s, const uint01 *buf, uint04 size)
Appends Base64-encoded data from a raw byte buffer to an existing string.
static Buffer< uint01 > DecodeFromBase64(StringView encoded_string)
Decodes a Base64-encoded string back into its original raw bytes.
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
The core String View class for the NDEVR API.
Definition StringView.h:58
The core String class for the NDEVR API.
Definition String.h:95
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...