There is also another way to convert between SecureString
and String
.
1. String to SecureString
SecureString theSecureString = new NetworkCredential("", "myPass").SecurePassword;
2. SecureString to String
string theString = new NetworkCredential("", theSecureString).Password;
Here is the link
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…