How to convert String to SecureString?
String
SecureString
You can follow this:
string password = "test"; SecureString sec_pass = new SecureString(); Array.ForEach(password.ToArray(), sec_pass.AppendChar); sec_pass.MakeReadOnly();