I\'m writing some code to utilise a 3rd party component, and I need to supply an object which implements ICredentials when I start to use it.
If I write the following...
The ideal security situation is that the password of a logged in user is not stored anywhere in memory. It is not stored anywhere on disk either. It exists only as a hash value to be compared against a string entered by a human being. Storing a password in clear is inherently a security risk and should be avoided whenever possible.
Given this principle, there is NO part of the operating system that even HAS your user's password in the clear, much less be willing to give it to you.