Skip to content

Commit dd99af9

Browse files
committed
Fix #33: More helpful explanation for base64_url_unpadded
I hope this makes things clear enough for readers. Let me know if anything is still hard to understand.
1 parent 639ec7c commit dd99af9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ or `<cppcodec/hex_lower.hpp>`. Currently supported variants are:
6262
* `base64_url` is the same as `base64_rfc4648` (and defined in the same RFC)
6363
but uses '-' (minus) and '_' (underscore) as special characters instead of
6464
'+' and '/'. This is safe to use for URLs and file names. Padding with '=' is
65-
still required.
66-
* `base64_url_unpadded` variant is the same as `base64_url`, if you want
67-
to do without padding (which, for this one, is optional).
65+
required, it will be generated when encoding to a string and regarded as a
66+
parse error if it's not present when decoding.
67+
* `base64_url_unpadded` variant is the same as `base64_url`, but '=' padding
68+
characters are optional. When encoding, no padding will be appended to the
69+
resulting string. Decoding accepts either padded or unpadded strings.
6870

6971
### base32
7072

0 commit comments

Comments
 (0)