EHS
Loading...
Searching...
No Matches
Base64.h
Go to the documentation of this file.
1#pragma once
2
3#include "EHS.h"
4#include "Str.h"
5
6namespace ehs
7{
8 class EHS_LIB_IO Base64
9 {
10 private:
11 static constexpr UInt_8 asciiUrl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
12 static constexpr UInt_8 ascii[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
13
14 public:
15 static Str_8 EncodeURL(const Str_8 &input);
16
17 static Str_8 Encode(const Str_8 &input);
18
19 static Str_8 DecodeURL(const Str_8 &input);
20
21 static Str_8 Decode(const Str_8 &input);
22
23 private:
24 static UInt_8 FindURL(const UInt_8 &c);
25
26 static UInt_8 Find(const UInt_8 &c);
27
28 static bool IsBase64URL(const UInt_8 &c);
29
30 static bool IsBase64(const UInt_8 &c);
31
32 };
33}
Definition Base64.h:9
static Str_8 Encode(const Str_8 &input)
Definition Base64.cpp:35
static Str_8 DecodeURL(const Str_8 &input)
Definition Base64.cpp:73
static Str_8 Decode(const Str_8 &input)
Definition Base64.cpp:133
static Str_8 EncodeURL(const Str_8 &input)
Definition Base64.cpp:5
Definition Anchor.h:6
unsigned char UInt_8
Definition Types.h:43
Str< Char_8, UInt_64 > Str_8
Definition Str.h:1953