Skip to content

Commit 03dc263

Browse files
committed
Use Encoding.UTF8 singleton instead of re-creating every time
1 parent 713f7e1 commit 03dc263

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

AspNetSaml/Saml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ private static string EnsureCertFormat(string cert)
6363

6464
public void LoadXmlFromBase64(string response)
6565
{
66-
UTF8Encoding enc = new UTF8Encoding();
67-
LoadXml(enc.GetString(Convert.FromBase64String(response)));
66+
LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(response)));
6867
}
6968

7069
//an XML signature can "cover" not the whole document, but only a part of it

0 commit comments

Comments
 (0)