Comments (3)
Hi @cleanerx, thanks for submitting the issue.
This library was intended to just provide encoding/decoding of valid Base64 strings. Although fixing the string eyJuYW1lIjoiSm9obiBEb2UifQ
with padding is quite trivial, it's not really considered "valid" base64 for the missing padding.
I'm not going to close this yet, as I do want to see what other libraries currently do with said string. I'm happy to reproduce behaviour in OpenSSL, so I'll spend some time seeing how they handle invalid padded strings there.
from base64pp.
@cleanerx OpenSSL also fails to decode the string you mentioned: https://godbolt.org/z/sKebhj4h5 (uncomment the padding and you can see it works).
Although I'm not a massive fan of changing the behaviour of the public API and doing things the user may not expect, I'll add some tasks here to provide this extra functionality to the library. I figured that, even though OpenSSL and other libs don't do this, it may be expected from users for the library to pad these base64 strings.
from base64pp.
Closed with #90
from base64pp.
Related Issues (20)
- Update documentation for the "decode" function
- Add Shared Library Build to CI HOT 1
- add std::string / std::string_view overload to base64pp::encode() HOT 5
- Sort out the API input parameters signatures
- Fix the inheritance of CMAKE_CXX_FLAGS in CMakePresets.json
- [RFC] Package for OpenEmbedded/Yocto Linux HOT 7
- Add shared library builds to CI HOT 1
- Sort out the naming for the builds in the CI
- Modify Docker and CI for building C++20 Modules
- Fix Debug builds for the Module branch
- Figure out how the moduled version of repo will live
- CI - Proper names to the builds
- Add support for unpadded base64 strings HOT 1
- Add CMake install step to CI
- Add more round-trip tests
- [CI/CD] Make sure coverage artifact upload happens even when coverage threshold fails
- [Conan] Add CI/CD to test conan package
- [Conan] consolidate package configurations
- Disable test building by default
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from base64pp.