Skip to content

Please add "web safe" base64 encoding #34

@ThorbenJ

Description

@ThorbenJ

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions