Typically speaking, whenever I use an icon for a link, I believe the icon should represent the actual action of clicking on that link. E.g. To edit a post, you'd typically use a pencil icon.
However, I would like to use an icon to show/hide a section or a password. The icon that I've typically seen for this type of action is an open eye and a closed eye or an eye with a line through it.
Keeping with the current logic that I assumed earlier, I would assume that the proper icon to display for a link that hides something would be the closed eye or eye with a line through it. But I'm having a little debate with some developers and I've also seen it where the opposite icon is used and I guess the thinking is that the icon would then represent the current status of what it is you're hiding and showing. It seems to me that closed eye is the more prevalent way to do it as that's also the way it seems IE does it built in for passwords.
My take is it's similar to the pattern of using plus (+) and minus (-) icons when expanding and contracting and accordion. You almost always see the plus icon being used when the content is contracted and the minus when the content is expanded.
So is there actually a standard here? Or is it somewhat subjective? Would love to hear if anyone's done a study to see what's more intuitive to users.