Secure String Helper Class

Michael Eddington (meddington@phed.org)

The .NET SecureString class can be hard to work and the only accessors for the data are through Marshaling calls.  There have been several instances were clients have wanted to add a SecureString into a state mechanism, or required some legacy support to older API’s.

All the Boys Love Mandy Lane ipod

This is a class that provides getting the secure string as an AES encrypted value and then also decrypting and returning a SecureString.  This is all done using p/invoke direct to the crypto api’s and the SecureString is therefor not leaked.

SecureStringHelper.cs


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.