Skip to content

Commit 6dc99f5

Browse files
[dotnet] Add future-proofing note on Base64UrlEncoder (#14821)
1 parent cfaa8c4 commit 6dc99f5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

dotnet/src/webdriver/Internal/Base64UrlEncoder.cs

+9-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@
1919

2020
using System;
2121

22+
#nullable enable
23+
2224
namespace OpenQA.Selenium.Internal
2325
{
26+
/*
27+
* Based on: https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/6.19.0/src/Microsoft.IdentityModel.Tokens/Base64UrlEncoder.cs
28+
*
29+
* Now it is a part of .NET 9+ as System.Buffers.Text.Base64Url
30+
* https://github.com/SeleniumHQ/selenium/issues/14813
31+
*/
32+
2433
/// <summary>
2534
/// Encodes and Decodes strings as Base64Url encoding.
2635
/// </summary>
@@ -45,8 +54,6 @@ public static class Base64UrlEncoder
4554
base64UrlCharacter63
4655
};
4756

48-
// https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/6.19.0/src/Microsoft.IdentityModel.Tokens/Base64UrlEncoder.cs#L85
49-
5057
/// <summary>
5158
/// Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation which is encoded with base-64-url digits.
5259
/// </summary>
@@ -115,8 +122,6 @@ public static string Encode(byte[] inArray)
115122
return new string(output, 0, j);
116123
}
117124

118-
// https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/6.19.0/src/Microsoft.IdentityModel.Tokens/Base64UrlEncoder.cs#L179
119-
120125
/// <summary>
121126
/// Converts the specified string, which encodes binary data as base-64-url digits, to an equivalent 8-bit unsigned integer array.</summary>
122127
/// <param name="str">base64Url encoded string.</param>

0 commit comments

Comments
 (0)