You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user