Please add "web safe" base64 encoding
ThorbenJ opened this issue · 0 comments
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