Base64URLNoPadding

Unpadded variation of Base64 encoding that is safe for use in URLs and filenames, as used in RFCs 4648 and 7515 (JWS/JWT/JWE).

See Base64Impl for a description of available methods.

alias Base64URLNoPadding = Base64Impl!('-', '_', Base64.NoPadding)

Examples

ubyte[] data = [0x83, 0xd7, 0x30, 0x7b, 0xef];
assert(Base64URLNoPadding.encode(data) == "g9cwe-8");
assert(Base64URLNoPadding.decode("g9cwe-8") == data);

Meta