I have just a general question: I don't quite understand when i have to use a secure string and when it is ok to use a normal string.
For example lets say i want to use PrincipalContext in my application.
PrincipalContext has multiple Constructors, few of which accept a password as a string.
PrincipalContext(ContextType type, String name ,String username, String password)
Would it cause a security problem if i pass a password as a string in this constructor? Would the password be visible in plain text anywhere? Could a hacker theoretically read this password?
Would there be a way to use a secure string instead?
I am new to the security part of programming, so i would really appreciate if someone could help me understand this.
Thank you!