Skip to content

Commit 6f014d0

Browse files
jasnellMylesBorins
authored andcommitted
doc: document that whitespace is ignored in base64 decoding
Fixes: #8569 PR-URL: #34227 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 431bfe1 commit 6f014d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/buffer.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ string into a `Buffer` as decoding.
111111

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

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

0 commit comments

Comments
 (0)