aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-02-23 11:08:24 +0100
committerGitHub Enterprise <[email protected]>2026-02-23 11:08:24 +0100
commit73f3eb4feedf3bca0ddc832a89a05f09813c6858 (patch)
tree4dbe639f5647fe2adab8a20668a70f22da1d9e09 /src/zencore/include
parentdisable msys logic in blake3 to fix Git Bash build issues (diff)
downloadzen-73f3eb4feedf3bca0ddc832a89a05f09813c6858.tar.xz
zen-73f3eb4feedf3bca0ddc832a89a05f09813c6858.zip
implemented base64 decoding (#777)
Co-authored-by: Stefan Boberg <[email protected]>
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/base64.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/base64.h b/src/zencore/include/zencore/base64.h
index 4d78b085f..08d9f3043 100644
--- a/src/zencore/include/zencore/base64.h
+++ b/src/zencore/include/zencore/base64.h
@@ -11,7 +11,11 @@ struct Base64
template<typename CharType>
static uint32_t Encode(const uint8_t* Source, uint32_t Length, CharType* Dest);
+ template<typename CharType>
+ static bool Decode(const CharType* Source, uint32_t Length, uint8_t* Dest, uint32_t& OutLength);
+
static inline constexpr int32_t GetEncodedDataSize(uint32_t Size) { return ((Size + 2) / 3) * 4; }
+ static inline constexpr int32_t GetMaxDecodedDataSize(uint32_t Length) { return (Length / 4) * 3; }
};
} // namespace zen