How to convert string to secure string

Hi Everyone,

I have a requirement to pass a secure string and I would like to convert a string to achieve that.

Any functions available to achieve

Hi @Vincent2

If you need convert ‘String’ to ‘System.Security.SecureString’
You can use assign:

YourString = new System.Net.NetworkCredential(string.Empty, YourSecurityString).Password

Hope this helps

1 Like

Hi @Vincent2

Try this:

(New System.Net.NetworkCredential("","give the password 

Output DataType System.Security.SecureString

Hope it helps!!

1 Like

Hi @Vincent2 ,
You can use
new System.Net.NetworkCredential(string.Empty, yourPassword).Password



1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.