Click here to Skip to main content
15,911,039 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,
I am saving the passwords of login as a file on the disk
I am very confused How I am to manage that stuff. as someone can copy the password file and save it for cracking.
Killed my brain. I guess you have some valuable suggestions.
Thank you for your interest.
Regards
Posted

1 solution

You should Hash the passwords and store the Hash.

When the user logs in and enters their password Hash it and then compare that to your saved file.

You might find Cryptography in C#[^] useful.
 
Share this answer
 
Comments
J imran 4-Feb-11 14:13pm    
what if the hacker take the hash file of a known password and save it to the other computer software program files. he can hack it easily
Henry Minute 4-Feb-11 14:19pm    
Hashing is a one-way process. Most of the encryption algorythms in the .Net Cryptography namespace are safe (except for MD5 which can be cracked under certain circumstances). If a hacker can get far enough into your system to steal the hashed file, it would do them no good unless they knew your hashing technique and had the users password. If they have the users password then no system is safe.

Read the article and about hashing on the internet, then make up your mind. I assure you that it is as safe as you can get unless you have access to a quantum computer.
MCY 4-Feb-11 15:36pm    
hashed values cannot be de-hashed, nor a password can be created to form the same value, as said by Henry.
if the hacker knows the password, then he does not need hashed value of it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900