473,405 Members | 2,210 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,405 software developers and data experts.

password decryption

160 100+
hi to all
we have a access to a mysql database in which password is in encrypted form in password field. i want to read actual password. how can i do that.

i need to know if i am not clear in my question
Feb 2 '09 #1
10 3675
Markus
6,050 Expert 4TB
What function do you use to encrypt the password? You should never need to see an unencrypted password. Say you use md5() to encrypt it, to see whether a provide password matches it, md5() the new password against the password in the database.
Feb 2 '09 #2
nathj
938 Expert 512MB
If it is because a user has forgotten their password then you need to authenticate them by username and email address and then send a new randomly generated password to the stored email address. They can then use that to log in and change their password. This is how most sites work.

As Markus said only the password owner - site user, should know the password.

nathj
Feb 2 '09 #3
waqasahmed996
160 100+
actually we are transfer our data from mysql to sql server. so there is many account holder already exist with their user name and password. i want to enter same password in sql server. that's why i need to decrypt that passwords

i am using md5() for encryption. so please any idea to decrypt md5() encrypted passwords in php.
Feb 3 '09 #4
TheServant
1,168 Expert 1GB
The whole point of encrypting passwords is that it is practically impossible to "decrypt" it with another function. I am sure it could be done if the encryption system was known, but that would defeat the whole point of having it.

The only way to find out what an md5()'d password is, is to guess it and compare md5(your guess) to the original string. So unlikely you are going to do that.

If you are moving servers why don't you just encrypt passwords with php and store it in the SQL server? As in why can't you just copy it over and treat it exactly the same? All it means is you can't use MySQL function, but using php should be the same shouldn't it?
Feb 3 '09 #5
nathj
938 Expert 512MB
TheServant has this spot on. There is no need to decrypt the password. Simply copy the encrypted (more strictly speaking hashed) value from one database to another and carry on as normal.

The hash should be done by PHP, that way the user can specify their own password which is hashed and stored. Then when they use it to log in you take the value entered, hash it and compare tat in the db. This should work regardless of the database - MySQL or SQL Server.

Cheers
nathj
Feb 3 '09 #6
waqasahmed996
160 100+
i dont know why but it is not working when same encrypted password is paste on other database. i am trying to find out why it is not working. As i come to know i will post message. but please if you how to decrypt md5() then guide me.
Feb 3 '09 #7
nathj
938 Expert 512MB
md5() is a hash and therefore cannot be decrypted. However, there are sites that offer look-up tables. they basically have a database of word with the md5 result. This is the best you can hope for.
Feb 3 '09 #8
TheServant
1,168 Expert 1GB
Mate, you cannot decrypt it like I said. Are you sure your SQL field is a long enough character length for it? Try store an md5()'d term in your new SQL tables and see if that works. If it does then you just have to copy the md5()'d passwords over, but if it doesn't you have an error in your code, SQL table setup, or SQL setup.
Feb 3 '09 #9
stepterr
157 100+
waqasahmed996,
Do you have a user table in SQL Server just like you do in MySQL. Or are you trying to do this in the SQL Server Login Properties for the SQL Server Authentication?
Feb 9 '09 #10
waqasahmed996
160 100+
thanks for reply

yes i have a table in SQL Server just like in Mysql. there is no issue of SQL Server Authentication
Feb 10 '09 #11

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

Similar topics

9
by: Jay | last post by:
Hi everybody ! I've used the "crypt()" function in PHP to save password of a user logging in a web-based system. Based on a book that I've read (PHP advanced by Larry UllMan), there is no way...
10
by: Max | last post by:
Hello all, I am trying to protect a page within my site with a JS password scheme. Now I know JS can be quite easily "circumvented", but I came by a code below. My question is: 1. Is there...
10
by: Niyazi | last post by:
Hi, I developed an application and I am using SQL Server 2000 developer edition. I create my database and I have also created tbl_USER table. I have an ID, RealName, UserName, and UserPassword...
4
by: hohans | last post by:
Hi all, I have an encryption class that encrypts and decrypts password using TripleDESCryptoServiceProvider. It was written originally in framework 1.0 and been working fine. And those...
1
by: probashi | last post by:
I need to store username and password in my windows application app.config file, from my application I am communicating to an external system (CICS). I believe, one of my options is to encrypt...
5
by: John | last post by:
Hi I am trying to set a new password using the following code; Dim u As MembershipUser = Membership.GetUser(UserName) Dim OldPassword As String OldPassword = u.GetPassword If...
11
by: cooltoriz | last post by:
Hello there, I just found that the compiled code won't hide the string variables so that I can see them by opening the execuable using Notepad. I have couple applications that have password...
0
by: Madni | last post by:
Hi, I have created pdf file using a library "pdflib" in C#.Net development environment.The generated pdf file is password protected (requires "owner password") disallowing some of the...
2
by: Jeff Williams | last post by:
I am developing an application which will allow users (students) to run applications on PC's with elevated rights. This is necessary for some applications which require Administrator rights on the...
3
by: mathewgk80 | last post by:
Hi all, I would like to know how can i encrypt and decrypt password using asp.net and c#.net... I would like to get some source code to do encryption and decryption.... Regards, Mathew
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.