Possible Duplicate:
Will the MD5 cryptographic hash function output be same in all programming languages?
Hi,
I have a problem about md5 hashing. Users can upload profile picures on my project. I am md5 hashing usernames for profile picture name. But there is something interesting. I am hashing a value both with a test page on my server and md5 encrypt websites with same result. When I use this encryption for renaming image, it produces something different. It produces different value on image manipulation file.
Do you have any idea?
This is my check script:
<?php echo md5('funky'); ?>
It produces below code on my server and also on md5encrypter.com :
6b818a3a6bf1234ed24c940021922b63
But it produces on my image manipulation file below code. I dont know what it is:
d41d8cd98f00b204e9800998ecf8427e
Script for sql query. $userId comes from logged in userId:
$sql = mysql_query("SELECT username FROM users WHERE userId='$userId'");
while($row=mysql_fetch_assoc($sql)){
$username=$row['username'];
}