Web Design and Development Forums

[SOLVED] Encrypted Password

This is a discussion on "[SOLVED] Encrypted Password" within the ASP Forum section. This forum, and the thread "[SOLVED] Encrypted Password are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > ASP Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Jan 2nd, 2008, 06:43   #1 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
[SOLVED] Encrypted Password

I don't know if this is done through server side scripting (ASP/PHP) or maybe Javascript, but since this forum (PHP) is so popular, I posted it here to get some fast feedback

Ok, I have downloaded an ASP Forum from Web Wiz Guide and I went behind the forum code to see how they coded some "thing". It came to my attention to see how they manage to do the Encrypted Password.

Situation:

When we successfully register to the system (Username & Password), and went to the database to see the password field, all I can see is some numbers and alphabets combination.

My password is: monie, but in the database it displays this:

BC2BFC83DBD77018D12B980BE82933332B99977A

This is really a secure way of storing a password! Even the Admin guy of the forum doesn't know the user password!

So my typical simple direct question is, How to do that?

Thanks in advance.
Cheers...
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 2nd, 2008, 06:51   #2 (permalink)
 
Rakuli's Avatar
 
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 980
Blog Entries: 2
Re: Encrypted Password

That "Hash" it.

Basically hashing is a one-way encryption method.. The most popular are MD5 SHA1 and SHA2..

They take a string and encrypt it into a uniform length..... Most scripting languages include an implementation of these algorithms...

MySQL has it as a password function

Code: Select all
INSERT INTO table VALUES (PASSWORD('monie'), username)
PHP makes it even easier

PHP: Select all



$hash 
md5('monie');

$hash sha1('monie'); 
I assume ASP has one as well

It will not be retrievable....
__________________
Rakuli

Helping you expand your epiphanies:

pen Source of pen Thoughts
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 2nd, 2008, 07:02   #3 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Encrypted Password

Thanks Rakuli.

That means we need to Encrypt the password before saving them to the database, right?
What about the login page, will the password field recognize the Encrypted password?
Or do we need to Decrypt them?

Thanks.
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 2nd, 2008, 07:05   #4 (permalink)
 
Rakuli's Avatar
 
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 980
Blog Entries: 2
Re: Encrypted Password

You can never actually decrypt them, it is one way only.

When you are checking passwords, you are comparing hashes rather than passwords. You has the password first and the check it against the database value.

in mysql this would be

Code: Select all
SELECT username FROM table WHERE password = PASSWORD('monie')
Or in PHP

PHP: Select all



if (md5('monie') == $password)
    echo 
'Password is okay!'
__________________
Rakuli

Helping you expand your epiphanies:

pen Source of pen Thoughts
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 2nd, 2008, 07:18   #5 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Encrypted Password

OK, let me search for the ASP Hash Algorithm first

EDIT: Found it, using MD5. I will look into it tonight. Thanks Rakuli! I'll get back to you ASAP
__________________


Last edited by Monie; Jan 2nd, 2008 at 08:04.
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 00:41   #6 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Encrypted Password

Ok, I manage to do it using MD5. What you need to do is download the MD5.asp file and include then on top of your page (verify page and register form page)

HTML: Select all
 <!--#include file="MD5.asp"-->
 ..
 ..
Password = MD5(Request.Form("txtPassword"))
Thanks Rakuli
Cheers...

P/S: Could you move this thread to ASP? Thanks.
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 00:48   #7 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: Encrypted Password

ASP has hardly any built in functions!
You'd probably have to download like 200 files to get the functions for a forum.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 01:18   #8 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Encrypted Password

As a matter of fact, ASP do have some built in function!Hai Alex. Just want to ask you
Do you mean when using MD5 in PHP, you just use the md5(textHere)? No other file needed? Include?

Cool..
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 01:41   #9 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: Encrypted Password

Yes you can do that, among a few other encryption functions.
Thanks for those links though!
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 01:55   #10 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Encrypted Password

Cool...

In asp you need to download one asp file, named md5.asp (few hundred lines of code) just to use the MD5 Algorithm!
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 02:56   #11 (permalink)
 
Rakuli's Avatar
 
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 980
Blog Entries: 2
Re: Encrypted Password

Quote:
Cool...

In asp you need to download one asp file, named md5.asp (few hundred lines of code) just to use the MD5 Algorithm!
It takes the same amount of lines but PHP is open source and md5 was long ago built into the core of the Zend Engine... ASP evolution is somewhat slower.
__________________
Rakuli

Helping you expand your epiphanies:

pen Source of pen Thoughts
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 03:06   #12 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Encrypted Password

This encrypted password cannot be reversed engineered, aren't they?
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 03:18   #13 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: Encrypted Password

Md5 is one way yes. It cannot be reversed.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Jan 3rd, 2008, 03:40   #14 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: Encrypted Password

Nice!
Thanks Alex!
Thanks Rakuli!

Cheers..
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Spry password confirmation widget in DW CS3 grandadbob Design & Development Software 5 Nov 30th, 2007 18:34
[SOLVED] Connection string for password protected databases alexgeek ASP Forum 6 Oct 31st, 2007 15:59
need help with password VanHype JavaScript Forum 2 May 24th, 2007 12:05
Password Validation s_mazhar HTML Forum 1 Oct 18th, 2005 21:38
[SOLVED] password protection Anonymous User HTML Forum 2 Feb 7th, 2005 18:05



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 13:30.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58