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

Please add "web safe" base64 encoding #34

Open
ThorbenJ opened this issue Oct 18, 2017 · 0 comments
Open

Please add "web safe" base64 encoding #34

ThorbenJ opened this issue Oct 18, 2017 · 0 comments

Comments

@ThorbenJ
Copy link

ThorbenJ commented Oct 18, 2017

Hi,

default/standard Base64 encoding include the chars '+', '/' & '=', which is problematic if you want to use a base64 encoded hash in URLs; requiring either another encoding, escaping or substitution.

As noted here: https://en.wikipedia.org/wiki/Base64#URL_applications; and from experience in using a number of Base64 libraries: It is often possible to enable a "web safe mode" for base64 encode/decode. In this mode '+', '/' & '=' are replaced with '-', '_' & '.' respectively. (Decoders are often agnostic of this mode, simply accepting both character possibilities)

Could you add this mode to the fingerprint plugin, as it would make much easier to use for elasticsearch document IDs (which must be URL safe)

Thanks & regards

Edit: typo fix

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