views:

27

answers:

1

I'm not sure I wrote the headline right, but I've got a service that holds a password in memory. It's notification thing, and so will be running 24/7 ideally.

It uses a password to some other resources that I send to it at startup in a UPD packet.

I'd like to find a way to instruct windows never to stick that value in the disk cache so if the worst happened, the theoretical bad guy couldn't pick apart the cache and find the password.

Can someone please point me in the right direction to figuring out how to do this?

+3  A: 

You should use the SecureString class.

SLaks