In my User class I have the password which is SecureString. To save the password, I have added the UserPassword property.
Sample code:
internal partial class User
{
public string ID { get; set; }
private string _password;
public SecureString Password
{
set { _password = SomePasswordHashing(value.ToString); }
}
public string UserPassword
{
get { return _password; }
set { _password = value; }
}
}
For the saving/retrieving of the UserPassword, does this property need to be public?
Is there a way not to load a UserPassword property (for instance when searching for the users, I would want to exclude loading all users' passwords)?