How to convert a String to Security String Using Visual Basic

Another way is with the NetworkCredential type:

(new System.Net.NetworkCredential(“”, “myString”)).SecurePassword

image

And to convert from SecureString to String, you can use:

(new System.Net.NetworkCredential(“”, mySecureString,)).Password

54 Likes