Skip to content

Commit

Permalink
doc: document that whitespace is ignored in base64 decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Jul 6, 2020
1 parent ee3416b commit 3c2bed4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ string into a `Buffer` as decoding.

* `'base64'`: [Base64][] encoding. When creating a `Buffer` from a string,
this encoding will also correctly accept "URL and Filename Safe Alphabet" as
specified in [RFC 4648, Section 5][].
specified in [RFC 4648, Section 5][]. Whitespace characters such as spaces,
tabs, and new lines contained within the base64-encoded string are ignored.

* `'hex'`: Encode each byte as two hexadecimal characters. Data truncation
may occur when decoding string that do exclusively contain valid hexadecimal
Expand Down

0 comments on commit 3c2bed4

Please sign in to comment.