Fixed "System::OpenURI". Added SHA256. Added URI safe Base64 methods.
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 6m9s
Build & Release / Linux-AMD64-Build (push) Successful in 15m26s
Build & Release / Linux-AARCH64-Build (push) Successful in 45m54s

This commit is contained in:
2025-05-11 19:43:50 -07:00
parent 2cb01a7c65
commit bce48fe121
12 changed files with 491 additions and 58 deletions

View File

@@ -8,17 +8,26 @@ namespace ehs
class EHS_LIB_IO Base64
{
private:
static const char ascii[];
static constexpr UInt_8 asciiUrl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
static constexpr UInt_8 ascii[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
public:
static Str_8 EncodeURL(const Str_8 &input);
static Str_8 Encode(const Str_8 &input);
static Str_8 DecodeURL(const Str_8 &input);
static Str_8 Decode(const Str_8 &input);
private:
static char Find(char c);
static bool IsBase64(char c);
static UInt_8 FindURL(const UInt_8 &c);
static UInt_8 Find(const UInt_8 &c);
static bool IsBase64URL(const UInt_8 &c);
static bool IsBase64(const UInt_8 &c);
};
}