Click here to Skip to main content
15,905,558 members
Home / Discussions / C#
   

C#

 
QuestionCell's pixel coordinated Pin
Salogus27-Dec-06 15:55
Salogus27-Dec-06 15:55 
QuestionArticle Submition Problem:( Pin
Muammar©27-Dec-06 13:46
Muammar©27-Dec-06 13:46 
AnswerRe: Article Submition Problem:( Pin
Colin Angus Mackay27-Dec-06 15:36
Colin Angus Mackay27-Dec-06 15:36 
GeneralRe: Article Submition Problem:( Pin
Muammar©28-Dec-06 3:51
Muammar©28-Dec-06 3:51 
QuestionHelp file Pin
md_refay27-Dec-06 12:01
md_refay27-Dec-06 12:01 
AnswerRe: Help file Pin
Mairaaj Khan27-Dec-06 19:16
professionalMairaaj Khan27-Dec-06 19:16 
Questionpassing values between 2 Forms Pin
Moham'd27-Dec-06 11:34
Moham'd27-Dec-06 11:34 
AnswerRe: passing values between 2 Forms Pin
Colin Angus Mackay27-Dec-06 11:59
Colin Angus Mackay27-Dec-06 11:59 
GeneralRe: passing values between 2 Forms Pin
Paul Conrad27-Dec-06 18:34
professionalPaul Conrad27-Dec-06 18:34 
GeneralRe: passing values between 2 Forms Pin
Moham'd30-Dec-06 3:15
Moham'd30-Dec-06 3:15 
QuestionMdiForm Pin
md_refay27-Dec-06 11:15
md_refay27-Dec-06 11:15 
AnswerRe: MdiForm Pin
Mairaaj Khan28-Dec-06 1:12
professionalMairaaj Khan28-Dec-06 1:12 
Questionfrom vb.net to C# Pin
microuser_200027-Dec-06 11:09
microuser_200027-Dec-06 11:09 
AnswerRe: from vb.net to C# Pin
Colin Angus Mackay27-Dec-06 12:08
Colin Angus Mackay27-Dec-06 12:08 
GeneralRe: from vb.net to C# Pin
microuser_200030-Dec-06 4:19
microuser_200030-Dec-06 4:19 
GeneralRe: from vb.net to C# Pin
Colin Angus Mackay30-Dec-06 7:22
Colin Angus Mackay30-Dec-06 7:22 
QuestionEncrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 9:26
Cormac M Redmond27-Dec-06 9:26 
AnswerRe: Encrypting files & usernames/passwords - What are the normal practises? [modified] Pin
Judah Gabriel Himango27-Dec-06 10:09
sponsorJudah Gabriel Himango27-Dec-06 10:09 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Dan Neely27-Dec-06 10:41
Dan Neely27-Dec-06 10:41 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Judah Gabriel Himango27-Dec-06 11:15
sponsorJudah Gabriel Himango27-Dec-06 11:15 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 11:24
Cormac M Redmond27-Dec-06 11:24 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Judah Gabriel Himango27-Dec-06 16:15
sponsorJudah Gabriel Himango27-Dec-06 16:15 
No, actually what you do is hash your password. To use MD5 hashing, you could do it like this:

using System.Security.Cryptography;
using System.Text;

...

string password = "super secret password";
byte[] passwordBytes = UnicodeEncoding.UTF8.GetBytes(password);
MD5 md5 = MD5CryptoServiceProvider.Create();
byte[] hashedPassword = md5.ComputeHash(passwordBytes); // <-- this is what you store in the database.


As you can see, this doesn't rely on any sort of key; in fact, you never need to store the user's real plain text password anywhere, just the MD5 (or other hashing algorithm) hash of that person's password. When the user goes to log in, hash his inputted password, and check it against the hashed passwords in the database. If they're equal, that means the user has specified a correct password.

This way is great for security -- even if someone got into your database or intercepted the password being sent to the server, it doesn't matter, because it's just the MD5 hash of the password, not the actual plain text password.

Make sense?


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Guess who's having a birthday? (It's not Jesus)
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 18:30
Cormac M Redmond27-Dec-06 18:30 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 11:23
Cormac M Redmond27-Dec-06 11:23 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Judah Gabriel Himango27-Dec-06 16:27
sponsorJudah Gabriel Himango27-Dec-06 16:27 

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.