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

md5 password encyption

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:
827ccb0eea8a706c4c34a16891f84e7b
Java MD5 hash:
827ccbeea8a706c4c34a16891f84e7b

Example for the password '1pass':
MySQL MD5 hash:
0a9f45cecbccaada43f6ca897743904d
Java MD5 hash:
a9f45cecbccaada43f6ca897743904d


The MySQL MD5 inserts a 0 somewhere, producing a string 1 extra character long.
Help?
Jun 22 '07 #1
2 4996
Atli
5,058 Expert 4TB
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
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
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 {
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?
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.
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.