473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Password encyption

37
Hi everyone, I m using visual studio 2005 and microsoft sql server to build my project.

My website consist of a registration page. I m interested to know how to save the text in the password field in a encrypted form in the mssql database.
What will be the appropriate data type of the column in the database?
Jan 26 '08 #1
5 1036
kenobewan
4,871 Expert 4TB
Depends on the method of encryption:
Encrypting Sensitive Data in a Database
Jan 26 '08 #2
gyap88
37
Depends on the method of encryption:
Encrypting Sensitive Data in a Database

Sorry the link is invalid..
Jan 26 '08 #3
kenobewan
4,871 Expert 4TB
Sorry the link is invalid..
My bad - http://aspnet.4guysfromrolla.com/articles/081705-1.aspx
Jan 27 '08 #4
wimpos
19
For storing passwords you should use an algorithm that has one way encryption, so it can be decrypted. md5 or hash , ...

User registers:
- choose password: mypass
- Hashed: o5d4g44f
- stored in database

User logs in
- user types password: mypass
- password hashed: o5d4g44f
- check if hash in database is the same
Jan 28 '08 #5
MD5 is good, when the message is encrypted, the length of the encrypted message will be a constant, 16 or 32
decryption is not needed, when a user submit a password, encrypt it, then compare with the encrypted password saved in database

Expand|Select|Wrap|Line Numbers
  1.     public static string GetMD5(string source)
  2.     {
  3.         string result = "";
  4.  
  5.         MD5 md5 = MD5.Create();
  6.         byte[] buffer = md5.ComputeHash(System.Text.Encoding.Unicode.GetBytes(source));
  7.         for (int i = 0; i < buffer.Length; i++)
  8.         {
  9.             result += buffer[i].ToString("X2");
  10.         }
  11.  
  12.         return result;
  13.     }
don't forget "using System.Security.Cryptography"
Jan 28 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
10
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
6
by: Andre Ranieri | last post by:
I'm trying to create a login page for customers to log into our corporate website, our presidents naturally wants the user and password fields to populate from a cookie so the customer doesn't have...
5
by: scorpion53061 | last post by:
is it possible to set the database password that you can set in access for a database from a vb.net application?
26
by: David Garamond | last post by:
I read that the password hash in pg_shadow is salted with username. Is this still the case? If so, since probably 99% of all PostgreSQL has "postgres" as the superuser name, wouldn't it be better...
8
by: Katash | last post by:
Hello, I am new to PHP and am working on a login system for my site, currently supplied passwords are passed to MySQL and stored as md5 hashes, my question is :- seeing as md5 is 1 way only what...
22
by: teejayem | last post by:
Hi, I am new to programming with databases and was wanting some help. Is there any way to password protect an access database and access sent sql commands to it via vb.net code? Any help...
1
by: Farooq Ahmad | last post by:
Dear All, I am in problem of implimenting Tripple DES (3DES) (ECB Mode) Encyption in vaisal basic 6.0. Can Anybody help me in this regard. Any Source Code OR DLL libarary. Thank In Advance.
2
by: wesomon99 | last post by:
Sorry if this is an obvious solution, but searching has produced nothing for me. I have a MySQL database with passwords encrypted using an MD5 hash. I then have java code that also encrypts using...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.