Click here to Skip to main content
15,890,947 members
Home / Discussions / C#
   

C#

 
QuestionProblem with shortcuts created by VS Setup Project Pin
FantasticFiasco8-Nov-09 1:39
FantasticFiasco8-Nov-09 1:39 
QuestionStoring Password Pin
Saksida Bojan8-Nov-09 0:05
Saksida Bojan8-Nov-09 0:05 
AnswerRe: Storing Password Pin
MumbleB8-Nov-09 0:48
MumbleB8-Nov-09 0:48 
GeneralRe: Storing Password Pin
Saksida Bojan8-Nov-09 0:59
Saksida Bojan8-Nov-09 0:59 
GeneralRe: Storing Password Pin
Ghydo8-Nov-09 1:52
Ghydo8-Nov-09 1:52 
GeneralRe: Storing Password Pin
Saksida Bojan8-Nov-09 6:46
Saksida Bojan8-Nov-09 6:46 
AnswerRe: Storing Password Pin
Gerry Schmitz8-Nov-09 1:03
mveGerry Schmitz8-Nov-09 1:03 
AnswerRe: Storing Password Pin
Abhishek Sur8-Nov-09 1:29
professionalAbhishek Sur8-Nov-09 1:29 
For password, what I generally do.. Is we encrypt the password using MD5 hash. This is one way encryption algorithm, so it cannot be decrypted. Now when you want to check, First encrypt the user input and then check with the existing.

Say for instance:
your password is "hello", we encrypt it and store say its "#548sfj"

now if the user inputs "hello" again from UI, you are going to encrypt it to get "#548sfj" and then compare them. This way you can remove the risk of stealing your password(as most of the people uses same password for many logins).

To use MD5 Hash use this Function :
public static string EncryptPassword(string Password) 
{
	byte[] data = new byte[15];
	MD5 md5 = new MD5CryptoServiceProvider();
	data = Encoding.ASCII.GetBytes(Password);
	byte[] result = md5.ComputeHash(data);
	return Encoding.ASCII.GetString(result);
}

Now after you encrypt store the password anywhere... such as XML file, config files, Database etc.
Hope you like my solution.
Cool | :cool: Rose | [Rose]

Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->

Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript

GeneralRe: Storing Password Pin
Ghydo8-Nov-09 1:51
Ghydo8-Nov-09 1:51 
GeneralRe: Storing Password Pin
Abhishek Sur8-Nov-09 1:57
professionalAbhishek Sur8-Nov-09 1:57 
GeneralRe: Storing Password Pin
harold aptroot8-Nov-09 3:46
harold aptroot8-Nov-09 3:46 
GeneralRe: Storing Password Pin
Abhishek Sur8-Nov-09 3:50
professionalAbhishek Sur8-Nov-09 3:50 
GeneralRe: Storing Password Pin
harold aptroot8-Nov-09 3:52
harold aptroot8-Nov-09 3:52 
GeneralRe: Storing Password Pin
Abhishek Sur8-Nov-09 3:58
professionalAbhishek Sur8-Nov-09 3:58 
GeneralRe: Storing Password Pin
Dave Kreskowiak8-Nov-09 5:16
mveDave Kreskowiak8-Nov-09 5:16 
GeneralRe: Storing Password Pin
Abhishek Sur8-Nov-09 5:25
professionalAbhishek Sur8-Nov-09 5:25 
GeneralRe: Storing Password Pin
Ghydo8-Nov-09 5:34
Ghydo8-Nov-09 5:34 
GeneralRe: Storing Password Pin
Abhishek Sur8-Nov-09 5:38
professionalAbhishek Sur8-Nov-09 5:38 
GeneralRe: Storing Password Pin
N a v a n e e t h8-Nov-09 5:36
N a v a n e e t h8-Nov-09 5:36 
GeneralRe: Storing Password Pin
Abhishek Sur8-Nov-09 5:37
professionalAbhishek Sur8-Nov-09 5:37 
AnswerRe: Storing Password Pin
harold aptroot8-Nov-09 3:35
harold aptroot8-Nov-09 3:35 
GeneralRe: Storing Password Pin
Abhishek Sur8-Nov-09 3:50
professionalAbhishek Sur8-Nov-09 3:50 
GeneralRe: Storing Password Pin
harold aptroot8-Nov-09 3:51
harold aptroot8-Nov-09 3:51 
GeneralRe: Storing Password Pin
Abhishek Sur8-Nov-09 3:55
professionalAbhishek Sur8-Nov-09 3:55 
GeneralRe: Storing Password Pin
harold aptroot8-Nov-09 3:56
harold aptroot8-Nov-09 3:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.