Coder Social home page Coder Social logo

Comments (3)

matheusgomes28 avatar matheusgomes28 commented on June 6, 2024

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.

matheusgomes28 avatar matheusgomes28 commented on June 6, 2024

@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.

matheusgomes28 avatar matheusgomes28 commented on June 6, 2024

Closed with #90

from base64pp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.