Connecting Tech Pros Worldwide Forums | Help | Site Map

how to protect (password) data at class library ?

Newbie
 
Join Date: Nov 2009
Posts: 4
#1: 4 Weeks Ago
i have apassword and i add it as avalue for aproperty (read only) at class library ,after comiling class library , if any one open the .dll as text file on (notepad) he will see a password !
how can i prevent this?

tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,791
#2: 4 Weeks Ago

re: how to protect (password) data at class library ?


Encrypt it first. Check the MSDN on encryption
Newbie
 
Join Date: Nov 2009
Posts: 4
#3: 3 Weeks Ago

re: how to protect (password) data at class library ?


the password is added to avariable at code as text
ex: string password="mypassword"
then i make encryption
my problem is after compiling if any one open the dll file as text file by notebad he will see the password
what i must do ?
please help me
Newbie
 
Join Date: Nov 2009
Posts: 4
#4: 3 Weeks Ago

re: how to protect (password) data at class library ?


the password is added to avariable at code as text
ex: string password="mypassword"
then i make encryption
my problem is after compiling if any one open the dll file as text file by notebad he will see the password
what i must do ?
please help me
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,791
#5: 3 Weeks Ago

re: how to protect (password) data at class library ?


Quote:
what i must do ?
Don't store passwords that way. Hardcoating passwords is just bad for exactly the reason you just discovered.

Enter the password in a field while the program is running, encode it, save it someplace for future comparison like in a file or the registry.
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,791
#6: 3 Weeks Ago

re: how to protect (password) data at class library ?


elhoseny1: Please do not create multiple threads for the same question/problem. The separate threads have now been merged.
Reply