title: How to convert SecureString to System.String?
body: <p>All reservations about unsecuring your SecureString by creating a System.String out of it <strong>aside</strong>, how can it be done?</p>
  
  <p>How can I convert an ordinary System.Security.SecureString to System.String?</p>
  
  <p>I'm sure many of you who are familiar with SecureString are going to respond that one should never transform a SecureString to an ordinary .NET string because it removes all security protections.  <strong>I know</strong>.  But right now my program does everything with ordinary strings anyway, and I'm trying to enhance its security and although I'm going to be using an API that returns a SecureString to me I am <em>not</em> trying to use that to increase my security.  </p>
  
  <p>I'm aware of Marshal.SecureStringToBSTR, but I don't know how to take that BSTR and make a System.String out of it.</p>
  
  <p>For those who may demand to know why I would ever want to do this, well, I'm taking a password from a user and submitting it as an html form POST to log the user into a web site.  So... this really has to be done with managed, unencrypted buffers.  If I could even get access to the unmanaged, unencrypted buffer I imagine I could do byte-by-byte stream writing on the network stream and hope that that keeps the password secure the whole way.  I'm hoping for an answer to at least one of these scenarios.</p>