Skip to content

Commit

Permalink
added explanation for base64 string length
Browse files Browse the repository at this point in the history
  • Loading branch information
alanisaac committed Mar 3, 2020
1 parent d09874d commit b9b42e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libraries/System.Text.Json/tests/JsonBase64TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static IEnumerable<object[]> InvalidBase64Tests()
private static string GenerateRandomValidLargeString()
{
var random = new Random(42);
var charArray = new char[502];
var charArray = new char[502]; // valid Base64 strings must have length divisible by 4 (not including surrounding quotes)
charArray[0] = '"';
for (int i = 1; i < charArray.Length - 1; i++)
{
Expand Down

0 comments on commit b9b42e1

Please sign in to comment.