From aa8c18aeed16a4c5d2e69f12c23ba8f169c7b8d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 05:22:23 +0000 Subject: [PATCH 1/3] Initial plan for issue From 8140e741eb0bd3f72dca92f0df893c8a084a7879 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 05:30:51 +0000 Subject: [PATCH 2/3] Add Base64Url character documentation explaining URL-safe encoding Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com> --- xml/System.Buffers.Text/Base64Url.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/xml/System.Buffers.Text/Base64Url.xml b/xml/System.Buffers.Text/Base64Url.xml index 5f70c246fb9..e416ea8a75f 100644 --- a/xml/System.Buffers.Text/Base64Url.xml +++ b/xml/System.Buffers.Text/Base64Url.xml @@ -27,7 +27,7 @@ Converts between binary data and URL-safe ASCII encoded text that's represented in Base64Url characters. - To be added. + Base64Url encoding uses the same alphabet as standard Base64 encoding, except that the characters '+' and '/' are replaced with '-' and '_' respectively to make the output URL-safe. @@ -373,7 +373,7 @@ The input span which contains binary data that needs to be encoded. Encodes the span of binary data into unicode ASCII chars represented as Base64Url. A char array which contains the result of the operation, i.e. the ASCII chars in Base64Url. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -406,7 +406,7 @@ The output span which contains the result of the operation, i.e. the ASCII chars in Base64Url. Encodes the span of binary data into Unicode ASCII chars represented as Base64Url. The number of bytes written into the destination span. This can be used to slice the output for subsequent calls, if necessary. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. The buffer in is too small to hold the encoded output. @@ -449,7 +449,7 @@ Encodes the span of binary data into unicode ASCII chars represented as Base64Url. One of the enumeration values that indicates the success or failure of the operation. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -486,7 +486,7 @@ The input span that contains binary data that needs to be encoded. Encodes the span of binary data into Unicode string represented as Base64Url ASCII chars. A string that contains the result of the operation, i.e. the ASCII string in Base64Url. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -523,7 +523,7 @@ The input span which contains binary data that needs to be encoded. Encodes the span of binary data into UTF-8 encoded text represented as Base64Url. The output byte array which contains the result of the operation, i.e. the UTF-8 encoded text in Base64Url. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -556,7 +556,7 @@ The output span which contains the result of the operation, i.e. the UTF-8 encoded text in Base64Url. Encodes the span of binary data into UTF-8 encoded text represented as Base64Url. The number of bytes written into the destination span. This can be used to slice the output for subsequent calls, if necessary. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. The buffer in is too small to hold the encoded output. @@ -599,7 +599,7 @@ Encodes the span of binary data into UTF-8 encoded text represented as Base64Url. One of the enumeration values that indicates the success or failure of the operation. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -926,7 +926,7 @@ Encodes the span of binary data into Unicode ASCII chars represented as Base64Url. if chars encoded successfully; if is too small. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -962,7 +962,7 @@ Encodes the span of binary data into UTF-8 encoded chars represented as Base64Url. if bytes encoded successfully; if is too small. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -1007,7 +1007,7 @@ if bytes encoded successfully; if is too small to fit the result. - This implementation of the base64url encoding omits the optional padding characters. + This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. From 800304c1f45f6cc4c02ff33e4161904749149d51 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 07:39:16 +0000 Subject: [PATCH 3/3] Fix Base64Url capitalization inconsistency in documentation Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- xml/System.Buffers.Text/Base64Url.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xml/System.Buffers.Text/Base64Url.xml b/xml/System.Buffers.Text/Base64Url.xml index e416ea8a75f..e215cd16231 100644 --- a/xml/System.Buffers.Text/Base64Url.xml +++ b/xml/System.Buffers.Text/Base64Url.xml @@ -373,7 +373,7 @@ The input span which contains binary data that needs to be encoded. Encodes the span of binary data into unicode ASCII chars represented as Base64Url. A char array which contains the result of the operation, i.e. the ASCII chars in Base64Url. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -406,7 +406,7 @@ The output span which contains the result of the operation, i.e. the ASCII chars in Base64Url. Encodes the span of binary data into Unicode ASCII chars represented as Base64Url. The number of bytes written into the destination span. This can be used to slice the output for subsequent calls, if necessary. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. The buffer in is too small to hold the encoded output. @@ -449,7 +449,7 @@ Encodes the span of binary data into unicode ASCII chars represented as Base64Url. One of the enumeration values that indicates the success or failure of the operation. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -486,7 +486,7 @@ The input span that contains binary data that needs to be encoded. Encodes the span of binary data into Unicode string represented as Base64Url ASCII chars. A string that contains the result of the operation, i.e. the ASCII string in Base64Url. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -523,7 +523,7 @@ The input span which contains binary data that needs to be encoded. Encodes the span of binary data into UTF-8 encoded text represented as Base64Url. The output byte array which contains the result of the operation, i.e. the UTF-8 encoded text in Base64Url. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -556,7 +556,7 @@ The output span which contains the result of the operation, i.e. the UTF-8 encoded text in Base64Url. Encodes the span of binary data into UTF-8 encoded text represented as Base64Url. The number of bytes written into the destination span. This can be used to slice the output for subsequent calls, if necessary. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. The buffer in is too small to hold the encoded output. @@ -599,7 +599,7 @@ Encodes the span of binary data into UTF-8 encoded text represented as Base64Url. One of the enumeration values that indicates the success or failure of the operation. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -926,7 +926,7 @@ Encodes the span of binary data into Unicode ASCII chars represented as Base64Url. if chars encoded successfully; if is too small. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -962,7 +962,7 @@ Encodes the span of binary data into UTF-8 encoded chars represented as Base64Url. if bytes encoded successfully; if is too small. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. @@ -1007,7 +1007,7 @@ if bytes encoded successfully; if is too small to fit the result. - This implementation of the base64url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding. + This implementation of the Base64Url encoding omits the optional padding characters. The encoding uses '-' and '_' instead of the '+' and '/' characters used in standard Base64 encoding.