diff --git a/JWT/JWT.cs b/JWT/JWT.cs index 32a31896f..62c4352c9 100755 --- a/JWT/JWT.cs +++ b/JWT/JWT.cs @@ -59,14 +59,14 @@ public static string Encode(IDictionary extraHeaders, object pay segments.Add(Base64UrlEncode(headerBytes)); segments.Add(Base64UrlEncode(payloadBytes)); - var stringToSign = string.Join(".", segments.ToArray()); + var stringToSign = string.Join(".", segments); var bytesToSign = Encoding.UTF8.GetBytes(stringToSign); byte[] signature = HashAlgorithms[algorithm](key, bytesToSign); segments.Add(Base64UrlEncode(signature)); - return string.Join(".", segments.ToArray()); + return string.Join(".", segments); } ///