Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use base64.RawURLEncoding instead of trimming the padding #240

Open
bokunodev opened this issue Mar 18, 2023 · 0 comments
Open

use base64.RawURLEncoding instead of trimming the padding #240

bokunodev opened this issue Mar 18, 2023 · 0 comments

Comments

@bokunodev
Copy link

from the doc:

RawURLEncoding is the unpadded alternate base64 encoding defined in RFC 4648. It is typically used in URLs and file names. This is the same as URLEncoding but omits padding characters.

relevant code:

a := strings.TrimRight(base64.URLEncoding.EncodeToString(s256[:]), "=")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant