473,725 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

md5 password encyption

16 New Member
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 MD5 to check passwords that a user puts in.

This works fine for almost all passwords. However, if a password begins with a number, the hash does not work.

Here is an example, for the password '12345':
MySQL MD5 hash:
827ccb0eea8a706 c4c34a16891f84e 7b
Java MD5 hash:
827ccbeea8a706c 4c34a16891f84e7 b

Example for the password '1pass':
MySQL MD5 hash:
0a9f45cecbccaad a43f6ca89774390 4d
Java MD5 hash:
a9f45cecbccaada 43f6ca897743904 d


The MySQL MD5 inserts a 0 somewhere, producing a string 1 extra character long.
Help?
Jun 22 '07 #1
2 5026
Atli
5,058 Recognized Expert Expert
The 32 character long MD5 that the MySQL is generating is correct. If this is the string generated by you Java function, it must be bugged.

I've check with both PHP and C#, and in both cases they matched the MySQL output.
Jun 23 '07 #2
wesomon99
16 New Member
The 32 character long MD5 that the MySQL is generating is correct. If this is the string generated by you Java function, it must be bugged.

I've check with both PHP and C#, and in both cases they matched the MySQL output.
Okay Atli, thanks for the help. I switched to using the MySQL MD5 encryption (SELECT MD5('password') ) and this has worked perfectly.
Jun 27 '07 #3

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

Similar topics

2
6009
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, and the linked tables are successfully created. I use the data from these linked tables in several forms. All works great until I close the Access frontend and open it again. When I try to use the forms, I get an error message: "Could not...
10
9883
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 {
5
16926
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?
22
5813
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 would be much appreciated. Thanks in advanced.
1
2744
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.
5
1049
by: gyap88 | last post by:
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?
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9176
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.