-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbase64.hpp
More file actions
28 lines (25 loc) · 855 Bytes
/
Copy pathbase64.hpp
File metadata and controls
28 lines (25 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Backtesting Engine in C++
//
// (c) 2025 Ryan McCaffery | https://mccaffers.com
// This code is licensed under MIT license (see LICENSE.txt for details)
// ---------------------------------------
#pragma once
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <string>
class Base64 {
public:
static const std::string b64encode(const void* data, const size_t &len);
static const std::string b64decode(const void* data, const size_t &len);
static std::string b64encode(const std::string& str);
static std::string b64decode(const std::string& str64);
static bool isValidBase64(const std::string& input);
static std::string checkInput(const std::string& base64_input);
};
class Utilities {
public:
static std::chrono::system_clock::time_point parseTimestamp(const std::string& ts);
};