added more tests
All checks were successful
.NET Test / test (push) Successful in 1m6s
.NET Publish / publish (push) Successful in 38s

This commit is contained in:
2024-08-15 22:00:49 +04:00
parent 43135a5ffb
commit 2b68ba982d
9 changed files with 206 additions and 7 deletions

View File

@@ -95,6 +95,8 @@ public static class Base64Url
[Pure] public static int Encode(ReadOnlySpan<byte> input, Span<char> output)
{
if (input.IsEmpty) return 0;
var charlen = 8 * ((input.Length + 5) / 6);
Span<char> chars = stackalloc char[charlen];
Convert.TryToBase64Chars(input, chars, out int charsWritten);