Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@ -28,6 +28,7 @@
using System;
using System.Net;
using System.Security;
using NUnit.Framework;
@ -99,6 +100,21 @@ namespace MonoTests.System.Net {
nc = new NetworkCredential ("user", "********", "dom");
CheckCustom (nc);
}
[Test]
public void DecipherSecureString ()
{
// many code snippets suggest using the following to get the decrypted string from a SecureString
var ss = new SecureString ();
ss.AppendChar('h');
ss.AppendChar('e');
ss.AppendChar('l');
ss.AppendChar('l');
ss.AppendChar('o');
string plain = new NetworkCredential (string.Empty, ss).Password;
Assert.AreEqual ("hello", plain);
}
}
}