2024-02-05 22:25:30 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "EHS.h"
|
|
|
|
#include "Str.h"
|
|
|
|
|
|
|
|
namespace ehs
|
|
|
|
{
|
2024-07-24 01:36:20 -07:00
|
|
|
class EHS_LIB_IO Base64
|
2024-02-05 22:25:30 -08:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
static const char ascii[];
|
|
|
|
|
|
|
|
public:
|
2024-07-24 01:36:20 -07:00
|
|
|
static Str_8 Encode(const Str_8 &input);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-07-24 01:36:20 -07:00
|
|
|
static Str_8 Decode(const Str_8 &input);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
|
|
|
private:
|
2024-07-24 01:36:20 -07:00
|
|
|
static char Find(char c);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
2024-07-24 01:36:20 -07:00
|
|
|
static bool IsBase64(char c);
|
2024-02-05 22:25:30 -08:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|