How to convert String to SecureString?
String
SecureString
Here is a cheap linq trick.
SecureString sec = new SecureString(); string pwd = "abc123"; /* Not Secure! */ pwd.ToCharArray().ToList().ForEach(sec.AppendChar); /* and now : seal the deal */ sec.MakeReadOnly();