stringutil added util::base64_encode/decode

This commit is contained in:
MihailRis
2024-01-25 02:07:44 +03:00
parent 32891ad156
commit 3cfdbc8338
2 changed files with 87 additions and 0 deletions
+5
View File
@@ -2,6 +2,7 @@
#define UTIL_STRINGUTIL_H_
#include <string>
#include <vector>
#include "../typedefs.h"
namespace util {
@@ -21,6 +22,10 @@ namespace util {
extern void trim(std::string &s);
extern std::wstring to_wstring(double x, int precision);
extern std::string base64_encode(const ubyte* data, size_t size);
extern std::vector<ubyte> base64_decode(const char* str, size_t size);
extern std::vector<ubyte> base64_decode(const std::string& str);
}
#endif // UTIL_STRINGUTIL_H_