Question:
Password encryption in PHP MySQL?
Nithya
2009-05-31 23:48:28 UTC
Its very urgent...

Anybody knows in which format they have stored the password in MySQL DB?

the encrypted password is '7JHe7Oo335uQ4JqjxIWyxw=='


Thanks in advance...
Five answers:
Doc
2009-06-01 00:29:16 UTC
To add to other comments: MD5 produces a 128-bit output. It looks to me like you are getting a MIME encoding of that output. So try doing MD5 and then convert it to MIME format -- maybe it will work!



Update: Serenity said it is a base64 encoding (instead of MIME), and I would assume she is right. So do md5 and then encode it in base64 and hopefully you get the same result. If you don't, then try looking at whether there are salt values (as she said). Normally salts are public.
?
2009-06-01 03:15:29 UTC
Sorry, no answer here! The MD5 encryption will return a string of 40 character long, with characters 0-9 and A-F and NOTHING else!

Since you have J, H, =, Upper and lower cases, it is NOT md5 encryption.

It is probably a user-defined encryption... (maybe 3 characters for each letter of the password).
balki
2009-05-31 23:53:26 UTC
It is probably stored as an md5 encryption. Its one way and u cannot get back the original password from this encrypted format.
elven_rangers
2009-06-01 00:13:07 UTC
The statement mysql uses is PASSWORD(). It is a md5 variation with a different randomization sequence (thus it is also one-way encryption).
serenity
2009-06-01 09:20:34 UTC
It is encrypted using the base64 format which pads with the equals sign [ http://en.wikipedia.org/wiki/Base64 ]. You may not be able to reverse engineer it without looking at the actual code as they may (and should) be using a salt.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...