From 0b642b6282d4ce266f34daee19268bebfd539e1e Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 30 Sep 2024 16:45:55 +0200 Subject: [PATCH 1/2] fixed missing cstdint includes --- src/A.Hristov/ahristov.h | 3 ++- src/ElegantDice/ElegantDice.h | 1 + src/omnifarious/omnifarious.h | 1 + src/tomykaria/tomykaria.hpp | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/A.Hristov/ahristov.h b/src/A.Hristov/ahristov.h index b75103b..27eaca9 100644 --- a/src/A.Hristov/ahristov.h +++ b/src/A.Hristov/ahristov.h @@ -1,4 +1,5 @@ #include +#include /** * Given a string, this function will encode it in 64b (with padding) */ @@ -7,4 +8,4 @@ std::string encodeBase64(const std::string& binaryText); /** * Given a 64b padding-encoded string, this function will decode it. */ -std::string decodeBase64(const std::string& base64Text); \ No newline at end of file +std::string decodeBase64(const std::string& base64Text); diff --git a/src/ElegantDice/ElegantDice.h b/src/ElegantDice/ElegantDice.h index 5fe31c7..4b5643a 100644 --- a/src/ElegantDice/ElegantDice.h +++ b/src/ElegantDice/ElegantDice.h @@ -2,6 +2,7 @@ #include #include +#include void base64_encode(std::string & out, const std::vector& buf); void base64_encode(std::string & out, const std::uint8_t* buf, size_t bufLen); diff --git a/src/omnifarious/omnifarious.h b/src/omnifarious/omnifarious.h index a2d0380..5b671a7 100644 --- a/src/omnifarious/omnifarious.h +++ b/src/omnifarious/omnifarious.h @@ -1,6 +1,7 @@ #pragma once #include +#include ::std::string base64_encode(const ::std::string &bindata); ::std::string base64_encode(const char *bytes, size_t length); ::std::string base64_decode(const ::std::string &ascdata); diff --git a/src/tomykaria/tomykaria.hpp b/src/tomykaria/tomykaria.hpp index 27f75f7..d514055 100644 --- a/src/tomykaria/tomykaria.hpp +++ b/src/tomykaria/tomykaria.hpp @@ -24,6 +24,7 @@ */ //https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594 #include +#include namespace macaron { @@ -126,4 +127,4 @@ class Base64 { } }; -} // namespace macaron \ No newline at end of file +} // namespace macaron From 729cb3b458e84ed8526e0815ba70a2a43b49a75a Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 30 Sep 2024 16:46:19 +0200 Subject: [PATCH 2/2] fixed narrowing conversion error on RISC-V platform --- src/user152949/user152949.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user152949/user152949.h b/src/user152949/user152949.h index 2a12440..9d69f7c 100644 --- a/src/user152949/user152949.h +++ b/src/user152949/user152949.h @@ -10,7 +10,7 @@ class CBase64 static inline const char encodeCharacterTable[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** Static Base64 character decoding lookup table */ - static inline const char decodeCharacterTable[256] = { + static inline const signed char decodeCharacterTable[256] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 ,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,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,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1,