Skip to content

Commit 14ac6e4

Browse files
committed
doc: document that whitespace is ignored in base64 decoding
Fixes: #8569 PR-URL: #34227 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 62bdb7e commit 14ac6e4

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)