From 3c2bed435f3948444ededdb3294a901f78403e97 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 6 Jul 2020 13:26:58 -0700 Subject: [PATCH] doc: document that whitespace is ignored in base64 decoding Fixes: https://github.com/nodejs/node/issues/8569 --- doc/api/buffer.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 719af1ba7f5814..87c75ac7831119 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -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