public void EncodeAndDecodeResultsAreEqual(byte[] data) { // Act var encodedString = Base64Url.Encode(data); var decodedBytes = Base64Url.Decode(encodedString); // Assert Assert.Equal(data, decodedBytes); // Ensure this also works with the Utf8 decoder Assert.Equal(data, Base64Url.DecodeUtf8(Encoding.UTF8.GetBytes(encodedString))); }