Skip to content

Commit 6a1b0a7

Browse files
Copilotjeffhandleygewarren
authored
Document Base64Url character encoding details in API reference (#11470)
* Initial plan for issue * Add Base64Url character documentation explaining URL-safe encoding Co-authored-by: jeffhandley <[email protected]> * Fix Base64Url capitalization inconsistency in documentation Co-authored-by: gewarren <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jeffhandley <[email protected]> Co-authored-by: gewarren <[email protected]>
1 parent 037167b commit 6a1b0a7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

xml/System.Buffers.Text/Base64Url.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<Interfaces />
2828
<Docs>
2929
<summary>Converts between binary data and URL-safe ASCII encoded text that's represented in Base64Url characters.</summary>
30-
<remarks>To be added.</remarks>
30+
<remarks>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.</remarks>
3131
</Docs>
3232
<Members>
3333
<Member MemberName="DecodeFromChars">
@@ -373,7 +373,7 @@
373373
<param name="source">The input span which contains binary data that needs to be encoded.</param>
374374
<summary>Encodes the span of binary data into unicode ASCII chars represented as Base64Url.</summary>
375375
<returns>A char array which contains the result of the operation, i.e. the ASCII chars in Base64Url.</returns>
376-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
376+
<remarks>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.</remarks>
377377
</Docs>
378378
</Member>
379379
<Member MemberName="EncodeToChars">
@@ -406,7 +406,7 @@
406406
<param name="destination">The output span which contains the result of the operation, i.e. the ASCII chars in Base64Url.</param>
407407
<summary>Encodes the span of binary data into Unicode ASCII chars represented as Base64Url.</summary>
408408
<returns>The number of bytes written into the destination span. This can be used to slice the output for subsequent calls, if necessary.</returns>
409-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
409+
<remarks>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.</remarks>
410410
<exception cref="T:System.ArgumentException">The buffer in <paramref name="destination" /> is too small to hold the encoded output.</exception>
411411
</Docs>
412412
</Member>
@@ -449,7 +449,7 @@
449449
</param>
450450
<summary>Encodes the span of binary data into unicode ASCII chars represented as Base64Url.</summary>
451451
<returns>One of the enumeration values that indicates the success or failure of the operation.</returns>
452-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
452+
<remarks>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.</remarks>
453453
</Docs>
454454
</Member>
455455
<Member MemberName="EncodeToString">
@@ -486,7 +486,7 @@
486486
<param name="source">The input span that contains binary data that needs to be encoded.</param>
487487
<summary>Encodes the span of binary data into Unicode string represented as Base64Url ASCII chars.</summary>
488488
<returns>A string that contains the result of the operation, i.e. the ASCII string in Base64Url.</returns>
489-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
489+
<remarks>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.</remarks>
490490
</Docs>
491491
</Member>
492492
<Member MemberName="EncodeToUtf8">
@@ -523,7 +523,7 @@
523523
<param name="source">The input span which contains binary data that needs to be encoded.</param>
524524
<summary>Encodes the span of binary data into UTF-8 encoded text represented as Base64Url.</summary>
525525
<returns>The output byte array which contains the result of the operation, i.e. the UTF-8 encoded text in Base64Url.</returns>
526-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
526+
<remarks>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.</remarks>
527527
</Docs>
528528
</Member>
529529
<Member MemberName="EncodeToUtf8">
@@ -556,7 +556,7 @@
556556
<param name="destination">The output span which contains the result of the operation, i.e. the UTF-8 encoded text in Base64Url.</param>
557557
<summary>Encodes the span of binary data into UTF-8 encoded text represented as Base64Url.</summary>
558558
<returns>The number of bytes written into the destination span. This can be used to slice the output for subsequent calls, if necessary.</returns>
559-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
559+
<remarks>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.</remarks>
560560
<exception cref="T:System.ArgumentException">The buffer in <paramref name="destination" /> is too small to hold the encoded output.</exception>
561561
</Docs>
562562
</Member>
@@ -599,7 +599,7 @@
599599
</param>
600600
<summary>Encodes the span of binary data into UTF-8 encoded text represented as Base64Url.</summary>
601601
<returns>One of the enumeration values that indicates the success or failure of the operation.</returns>
602-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
602+
<remarks>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.</remarks>
603603
</Docs>
604604
</Member>
605605
<Member MemberName="GetEncodedLength">
@@ -926,7 +926,7 @@
926926
<summary>Encodes the span of binary data into Unicode ASCII chars represented as Base64Url.</summary>
927927
<returns>
928928
<see langword="true" /> if chars encoded successfully; <see langword="false" /> if <paramref name="destination" /> is too small.</returns>
929-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
929+
<remarks>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.</remarks>
930930
</Docs>
931931
</Member>
932932
<Member MemberName="TryEncodeToUtf8">
@@ -962,7 +962,7 @@
962962
<summary>Encodes the span of binary data into UTF-8 encoded chars represented as Base64Url.</summary>
963963
<returns>
964964
<see langword="true" /> if bytes encoded successfully; <see langword="false" /> if <paramref name="destination" /> is too small.</returns>
965-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
965+
<remarks>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.</remarks>
966966
</Docs>
967967
</Member>
968968
<Member MemberName="TryEncodeToUtf8InPlace">
@@ -1007,7 +1007,7 @@
10071007
</summary>
10081008
<returns>
10091009
<see langword="true" /> if bytes encoded successfully; <see langword="false" /> if <paramref name="buffer" /> is too small to fit the result.</returns>
1010-
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
1010+
<remarks>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.</remarks>
10111011
</Docs>
10121012
</Member>
10131013
</Members>

0 commit comments

Comments
 (0)